Find file History
Pull request Compare This branch is 8 commits ahead, 376 commits behind canary.
mherodev and timneutkens #4751 - Explicitly mention install when cloning examples (#4758)
Preferably this installation wouldn't be necessary, but in lieu of a fix...

Latest commit 5b3578e Jul 11, 2018

Deploy to now

Example app using nested components

How to use

Using create-next-app

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

npx create-next-app --example nested-components nested-components-app
# or
yarn create next-app --example nested-components nested-components-app

Download manually

Download the example:

curl | tar -xz --strip=2 next.js-canary/examples/nested-components
cd nested-components

Install it and run:

npm install
npm run dev
# or
yarn dev

Deploy it to the cloud with now (download)


The idea behind the example

Taking advantage of the composable nature of React components we can modularize our apps in self-contained, meaningful components. This example has a page under pages/index.js that uses components/paragraph.js and components/post.js that can be styled and managed separately.