I'm Michal Kvasničák a full stack engineer from 🇸🇰. I ❤️ React, GraphQL, Node.js, Typescript...
I know this README is boring, what'd you like to know? Ask me anything!
THIS PROJECT IS NO LONGER MAINTAINED AND HAS BEEN UNPUBLISHED FROM NPM
License: MIT License
I want to test routex in browser environment
I want to test edge cases
nextRoute never ends up in routex state: https://github.com/michalkvasnicak/routex/blob/master/src/createRoutex.js#L87
The pushState
and replaceState
methods are now called push
and replace
.
https://github.com/michalkvasnicak/routex/blob/master/src/Router.js#L143
https://github.com/michalkvasnicak/routex/blob/master/src/Router.js#L146
Prever is not really ready for this. So just in case, karma
Right now createRoutex
discards the router state that could be generated server side. Is it because of some race condition with async routes or something else?
My use case for having the server state rehydrated is that I'd like to use the routes onEnter
to specify data dependencies for the current route. Ideally this callback would be called only once, since the data the route needs should already be there when the page loads.
Add possibility to have multiple routes on site
Maybe it should store in query string?
How should stores be defined in redux ?
How to prevent other routers to dispatch NOT FOUND?
And how do we know when routing finished?
Currently when the routes are instantiated into Route objects only a subset of the original route object copied across into a Route instance.
I'm not using react so the component attribute is of no use.
I'd like to be able to keep any custom attributes on the route e.g
const routes = [
{
path: '/',
specialSauce: 1
}
];
These are instead silently discarded.
For a router that claims to not require React the definition of the Route class kind of pushes react.
Add possibility to load route in async.
Add prop to Link
component to call transitionTo with given path (and parse query params from string).
Link should not generate link for this definition of route.
In case that a user wants to pass optional params to handler (for example in redux apps it can be getState and dispatch functions)
If user is on route for example /
, router will store state to history api. But then if user is loading something using AJAX and storing to store and he refreshes the page, onEnter
handler is not called because history api already contains state and data don't exist.
Solution:
onEnter
handlers should be called always and user should manage caching in them by current state.
Example:
User is on route A
and wants to go to B
, he clicks on link, router calls onLeave
on the A
route. In A.onLeave
callback user shows confirmation dialog (for example bootstrap modal, which is async). And waits for confirmation. But somewhere he clicks on link that is routed to C
.
Now, we need mechanism to tell the router that he clicked on C
but A.onLeave
is not resolved yet so C
has to be cancelled.
Probably add active
css class automatically?
Or do we want to allow user to define what to add to css classes?
Or callback?
I know @mjackson is re-implementing the router primitives (such as histories) in a more functional way in https://github.com/rackt/history. While this is a work in progress, you might be interested to take a look and maybe even use it internally.
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.