rsnext/docs/basic-features/data-fetching
Eric Burel e69820accc
Loosen the "public" condition on getSSP (#36018)
<!--
Thanks for opening a PR! Your contribution is much appreciated.
In order to make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below.
Choose the right checklist for the change that you're making:
--

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`
** I've made the change via GitHub UI sorry :)**

Hi, 

I think the "data must be public" condition on getSSP is not really true, and even counter-productive. Being able to statically render more content is most probably positive, in terms of perceived and real performance of the app + energy consumption. It's actually totally possible, and not even that hard thanks to middleware, to statically render custom, paid, segment-specific content (and even individual-specific content under certain conditions).

I've documented the reason for this change in a few places if you want more details:
- related PR on React: https://github.com/reactjs/reactjs.org/pull/4566
- demo implementation and explanation on how to couple middlewares and getSSP to statically render any kind of content (including custom content): https://blog.vulcanjs.org/render-anything-statically-with-next-js-and-the-megaparam-4039e66ffde
2022-04-15 13:23:32 +00:00
..
client-side.md Fix typo (#34480) 2022-02-17 15:18:59 +00:00
get-server-side-props.md docs: clarify when you use getServerSideProps (#35922) 2022-04-07 22:00:28 +00:00
get-static-paths.md Fix issues in getStaticPaths docs (#34840) 2022-02-25 20:36:05 -08:00
get-static-props.md Loosen the "public" condition on getSSP (#36018) 2022-04-15 13:23:32 +00:00
incremental-static-regeneration.md Fix typo (#34480) 2022-02-17 15:18:59 +00:00
overview.md Changed data fetching file name to overview to fix meta data title (#33232) 2022-01-27 09:14:14 -06:00