Routing is the process of selecting a path for traffic in a network..."
provide resources
trigger side effects
URL - uniform resource locator
Text
server side rendering
= (Ruby on) RAILS
client side rendering
client side rendering (composable)
= page.js react-router
files structure by context
- general
- common
- pages
- redux
routing state part of UI
catch missing pages
handle invalid results
relation abstraction (composed, nested)
history encapsulation (mocking, universal)
modular extendable (scrolling)
async processing(hooks, transition)
Connect Pages:
Match Definition:
import { Route } from 'react-router'
<Route path='...' component={...} />
import { withRouter } from 'react-router
withRouter(component)
Get Router:
import { Link } from 'react-router'
<Link to='...'>{...}</Link>
Navigate Action:
import { push as pushHistory } from 'react-router-redux'
<button onClick={() => pushHistory('...')}>Back to ...</button>
- dashboard for (internal) settings
Inspector for developers
Tasks:
- show and toggle available feature flags
- show exposed environment variables
- enable debugging logs
- highlight production environment