rsnext/examples/with-cxs
Tim Neutkens de08b1fff1
Remove unsupported examples (#26075)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-06-14 20:27:06 +02:00
..
pages chore(examples): fix missing document components error messages (#16802) 2020-09-03 21:13:12 +00:00
.gitignore Added .gitignore to examples that are deployed to vercel (#15127) 2020-07-16 10:52:23 -04:00
package.json Ensure all examples are MIT licensed (#16691) 2020-08-29 22:32:35 -04:00
README.md Remove unsupported examples (#26075) 2021-06-14 20:27:06 +02:00

Example app with cxs

This example shows how to use a different styling solution than styled-jsx that also supports universal styles. That means we can serve the required styles for the first render within the HTML and then load the rest in the client. In this case we are using cxs.

For this purpose we are extending the <Document /> and injecting the server side rendered styles into the <head>.

Preview

Preview the example live on StackBlitz:

Open in StackBlitz

Deploy your own

Deploy the example using Vercel:

Deploy with Vercel

How to use

Execute create-next-app with npm or Yarn to bootstrap the example:

npx create-next-app --example with-cxs with-cxs-app
# or
yarn create next-app --example with-cxs with-cxs-app

Deploy it to the cloud with Vercel (Documentation).