react-router-component icon indicating copy to clipboard operation
react-router-component copied to clipboard

Use history package

Open andreypopp opened this issue 10 years ago • 2 comments

React Router team recently extracted DOM API related part of its router into https://github.com/rackt/history

I think it would be nice for RRC to reuse this package.

andreypopp avatar Aug 10 '15 11:08 andreypopp

The problem with rackt's history is that it provides history as is without any way to view it as a context, which provides an unclean abstraction for contextual routing.

On that note, I prototyped a tiny history component before I started using react-router-component (after which I actually didn't see any need to use the history directly). Its here for reference: https://gist.github.com/prasannavl/7f6c47407f3d31230083

It implements the HTML5 history and an essential only memory history for the prototype, but should be very easy to do the rest considering the interfaces.

prasannavl avatar Mar 04 '16 10:03 prasannavl

Update: I've written a full implementation of a contextual history api with promises here: https://github.com/prasannavl/history-next. Might I suggest to have a look to see if its worth it going that way? :)

prasannavl avatar Mar 13 '16 10:03 prasannavl