v2-mst-aptd-gcms-lcz-sty
General documentation about NRN is available at https://unlyed.github.io/next-right-now/.
The role of this demo is to showcase what's built-in within the selected preset only.
SSR can be used either through getInitialProps
or getServerSideProps
.
getInitialProps
, because even though it is not officially deprecated, it is preferred to use getServerSideProps
whenever possible. getInitialProps
because you have to make your code universal, because it will be executed from the server (SSR) and the browser (CSR), and it usually leads to increased complexity and tougher bugs.We also strongly recommend using SSG, whenever possible.
SSG can only be used using getStaticProps
, NRN provides a getCommonStaticProps
helper to configure common stuff between all SSG-based pages and reduce code duplication.
fallback
optionYou should use it if you only want/can pre-generate only part of your static pages at build time, and then build static pages on-demand upon request.
It's very interesting if you've got a ton of pages and want faster builds. This way, you can pre-build only the most used pages of your app, and build other pages on-demand if they ever get requested.
revalidate
option (BETA)The revalidate
option is strongly related to the Incremental Static Regeneration concept.
Basically, it's the ability to regenerate parts of your apps based on your own business rules.
Currently, it only supports a time-based regeneration (similar to TTL), thus when your page is too old, it gets regenerated.
TS is treated as first-class citizen, we do our best to make the TS experience as smooth and simple as possible.
We use TS a lot, and type everything. You could say NRN comes with an advanced TS usage.
This can be overwhelming for TS beginners, even though you shouldn't have anything to configure by yourself, you'll still need to understand the concepts and be aware of the features we use.
We strongly recommend you to take a look at the React TypeScript Cheatsheets, which is amazing for both beginners and experienced TS users.
NRN is meant to help you, but basic Next.js knowledge will be necessary as we don't focus on the basics here but mostly on the difficult/advanced stuff.
MST
is similar to the monorepo
design, where the same source code can be used to deploy multiple instances.CookieConsent
OSS library”I18nLink
componentunly-nrn+contributor@unly.org
bbU#Ec2m6FpqU7&
DRAFT
content in priority.customer.ref
values, as it would break the associated demo, if the ref
doesn't match.