0916dhkim / typed-react-router Goto Github PK
View Code? Open in Web Editor NEWProof of concept implementation of typescript-friendly react-router hooks.
Proof of concept implementation of typescript-friendly react-router hooks.
(cross posted on your blog post)
Love this idea, and works great but cant figure out how to implement modals with this method. Any idea how I would also implement Modal routes that would keep background page location? I don't think a second switch works because the nature how switches only matches one route.
Similar to this example but i do not contextualize whether or not info is presented in a modal or not. Its always in a modal
v5.reactrouter.com/web/example/mod...
Thanks
Hey, I came across your article and started implementing the code into my project. This is such awesome work, thanks so much for putting time into it.
I would like to pass an object into state in TypedLinkProps
, but I'm very new to TypeScript typings. Right now, i have something like this:
<Link to={{ pathname: `${ROUTES.MENU}/${menu.id}`, state: { menu } }} >...</Link>
where 'menu' is the object in question. I would like my typed Link to recognize that this menu
is required in the component that renders this route.
Could you point me in the right direction to add this? Thanks again, keep up the good work.
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.