redux-first-router icon indicating copy to clipboard operation
redux-first-router copied to clipboard

Using "hash" based routing with redux-first-router

Open nitinkatyal1314 opened this issue 3 years ago • 3 comments

Hi, I have a use case where I want to enable the react routing via hash values in url. For e.g - /home#1 , /home#2

These hash values "1" and "2" would basically setup a state of the component and render it.

Currently, I don't see any documented mechanism to accomplish this out-of-the-box via redux-first-route. The location reducer does not exposes the hash value and similarly I can't dispatch actions to update the hash as well.

Is there any way to solve this?

nitinkatyal1314 avatar May 31 '22 07:05 nitinkatyal1314

You need https://github.com/respond-framework/rudy

hedgepigdaniel avatar Jun 02 '22 07:06 hedgepigdaniel

You need https://github.com/respond-framework/rudy The documentation for Rudy clearly mentions that this is a work in progress and some features are incomplete. I am not sure if I can rely on it for enterprise platform.

nitinkatyal1314 avatar Jun 14 '22 10:06 nitinkatyal1314

I dont recommend using this fork, but here is a commit that shows how we implemented hash routing.

Perhaps you could cobble a P.R together for this repo from that?

https://github.com/orionhealth/redux-first-router/pull/1/commits/1e868f21d7a81e4bbc89a43a49b9912c27da92a2#diff-d6f2993c842d188de373ad0e490bdfe1958ca28fdbd256617733be1bfb08a304

colmbrady avatar Aug 07 '22 22:08 colmbrady