leonardogentile / react-mobx-router5 Goto Github PK
View Code? Open in Web Editor NEWReact components for routing solution using router5 and mobx
License: MIT License
React components for routing solution using router5 and mobx
License: MIT License
Created a new from the sratch React Application. Installed latest version of mobx.
"react": "^17.0.2",
"react-dom": "^17.0.2",
Then followed steps mentioned in https://github.com/LeonardoGentile/react-mobx-router5-example
Added plugins as mentioned.
Issues: router.navigate('xyz') changing the url but not rerendering routing component. Can you please help me if something going wrong from my side.
Awaiting mobxjs/mobx-react#588
Hey,
While trying to update router5 i discovered that this package requires [email protected] :-) It would be really great if the package could support [email protected] as well :-) !
When installing MobX 5+, NPM will fire warnings of react-mobx-router5's dependencies because it requires ^4.0.0. Can this be adjusted to (also) be compatible with ^5.0.0 ?
npm WARN [email protected] requires a peer of mobx@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of mobx@^4.0.0 but none is installed. You must install peer dependencies yourself.
all the components including node components are rendered twice. I tried the example project https://github.com/LeonardoGentile/react-mobx-router5-example, same result.
Here's how: put console.log
in the render()
method on both Home.jsx
and Main.jsx
in the example project, I get the log message twice.
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
Hi,
I have been using this router in a production application for a while now and is very happy with the result.
Today when i was working on some new features i discovered a bug og rather a issue with the way routeNode's with mobx.
When a route matches the same route even though the route changed(params change) the child RouteNode is not updated beacause the interception point is the parrent route due to the param change and the parrent router matches the same route so the child Router do not get rerendered.
See this reproduction: https://stackblitz.com/edit/react-azsnhb :-)
The unexpected behavior is that the nested router statys at article even though the route is updated to the info page. :-)
peer dependency requires react@^15.0.0, it'll be nice to support react 16 :)
Hi @LeonardoGentile !
Can we have support for the disabled
attribute in BaseLink
, so I can disable the Link
components when i'm submitting a form for example.
Hi.
I have a requirement to replace the 'Something went wrong' message with a nicer looking view which is much more complex than a simple string.
How would I go about doing this ?
Should I raise a PR for this change ?
Or should I be forking this project and maintaining my own version ?
according to the documentation, the BaseLink
component should not require router
or routerStore
if onClick
prop is passed in. It's giving error this.router is null
on Firefox and Uncaught TypeError: Cannot read property 'navigate' of null
on Chrome
mobx-router5
needs update as well
Hello mates!
This little project of mine started to solve a personal problem but it turns out other people are using it ;)
I'd like to have a little feedback if you have a couple of minutes:
getComponent
or RouteView
utilities or using a plain ol' switch?Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.