ReactTraining/react-router 43374
Declarative routing for React
Manage session history with JavaScript
ReactTraining/react-media 2370
CSS media queries for React
ReactTraining/react-broadcast 1323
Reliably communicate state changes to deeply nested React elements
ReactTraining/classic-react-workshop 1299
Lectures and exercises for React Training workshops
Render React.js components on any backend
ReactTraining/hooks-workshop 399
The course material for our React Hooks workshop
ReactTraining/react-history 265
Manage session history with React
ReactTraining/react-workshop 205
The course material for our React Hooks workshop
Fast touch events for React
startedReactTraining/react-router
started time in an hour
startedReactTraining/react-media
started time in 2 hours
startedReactTraining/react-media
started time in 3 hours
startedReactTraining/react-router
started time in 4 hours
startedReactTraining/history
started time in 5 hours
startedReactTraining/react-router
started time in 6 hours
startedReactTraining/history
started time in 17 hours
issue openedReactTraining/react-router
6.0.0-beta.0: problems with value comparisons in code
I saw the comparison code in 6.0.0-beta.0
export function generatePath(path: string, params: Params = {}): string {
return path
.replace(/:(\w+)/g, (_, key) => {
invariant(params[key] != null, `Missing ":${key}" param`);
return params[key];
})
.replace(/\/*\*$/, _ =>
params['*'] == null ? '' : params['*'].replace(/^\/*/, '/')
);
}
export function useInRouterContext(): boolean {
return React.useContext(LocationContext).location != null;
}
Why should ! = and == , I'm curious why write it this way
created time in 20 hours
fork ReactDevCode/react-router
Declarative routing for React
https://reacttraining.com/react-router/
fork in 21 hours
startedReactTraining/history
started time in a day
startedReactTraining/react-router
started time in a day
startedReactTraining/react-router
started time in a day
startedReactTraining/react-router
started time in a day
fork OurCodeSpace/react-workshop
The course material for our React Hooks workshop
https://reacttraining.com/workshops
fork in a day
startedReactTraining/classic-react-workshop
started time in a day
startedReactTraining/react-router
started time in a day
fork anis-b-amara/react-router
Declarative routing for React
https://reacttraining.com/react-router/
fork in a day
issue closedReactTraining/react-router
about useHistory from react-router-dom some problem
is me use error? why history is undefined,i want to user history.push()
https://codesandbox.io/embed/react-router-v5-starter-forked-zn0dm?fontsize=14&hidenavigation=1&theme=dark
closed time in a day
FlyFishCodestartedReactTraining/history
started time in 2 days
startedReactTraining/react-router
started time in 2 days
fork ds3783/react-router
Declarative routing for React
https://reacttraining.com/react-router/
fork in 2 days
startedReactTraining/react-router
started time in 2 days
issue commentReactTraining/react-router
about useHistory from react-router-dom some problem
Thank you, it has been resolved. Can help me find documentation about useHistory api. I can't find it in'react-router-dom'
comment created time in 2 days
issue commentReactTraining/react-router
about useHistory from react-router-dom some problem
ok,i'll try
comment created time in 2 days
issue commentReactTraining/react-router
about useHistory from react-router-dom some problem
You have to wrap the Router component in the outer layer. Now that it's in the App component, you can try it by moving the UseHistory component to the About component
comment created time in 2 days
issue commentReactTraining/react-router
about useHistory from react-router-dom some problem
The Router component must be wrapped in an outer layer
comment created time in 2 days
startedReactTraining/react-router
started time in 2 days
startedReactTraining/react-router
started time in 2 days