https://github.com/codebanesr/react-fundamentals
https://github.com/codebanesr/react-fundamentals
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/codebanesr/react-fundamentals
- Owner: codebanesr
- Created: 2018-04-30T14:30:47.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-01T19:48:36.000Z (almost 8 years ago)
- Last Synced: 2025-01-20T11:29:11.146Z (about 1 year ago)
- Language: JavaScript
- Size: 266 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
How it works
-------------------------
index.js and index.html are very closely related
we have a div element called where we are rendering our router
//all child components here which makes App as the layout component i.e whatever
is put in App component will appear on all pages
//no path required here since it //matches nothing
//dont do "/about" that matches //Router path already above
so what are we rendering on root div of index.html
------------------------------------------------------------
Two things - 1st is app component and the second one is any other path that matches
if nothing appears after "/" then IndexRoute will display HomeComponent
if about matches then app component + this.props.child will display AboutComponent and so on