ink icon indicating copy to clipboard operation
ink copied to clipboard

Add react-router/MemoryRouter to list of useful components in the readme

Open advl opened this issue 4 years ago • 4 comments

I've been looking for a solution to implement routing in ink, in particular I saw this https://github.com/jimmed/ink-router which looks abandoned but let me understand I was not the first one to take a look at this need,

I ended up looking at the source code of 'react-router' to implement my own quick and dirty solution, and then realized that MemoryRouter could do the job, and indeed, I started using it in Ink and it worked just fine. For the record I have been managing Router state trough history functions, in particular history.push, and consuming context state through Switch/Route.

advl avatar Nov 08 '20 22:11 advl

I think this would be good as a short tip/recipe at the bottom of the readme. It needs more context than just a link.

sindresorhus avatar Nov 20 '20 11:11 sindresorhus

Will do a PR tomorrow if that's good for you

advl avatar Nov 22 '20 23:11 advl

Solved in #399

advl avatar Nov 24 '20 20:11 advl

Sorry for notifying in 2 years old thread but this documentation is really helpful and would love to have it on a more accessible place.

YakupTURKAN-pf avatar Oct 11 '22 10:10 YakupTURKAN-pf