Applying Browser History to a ReactStudio Project


#22

Hi. So far I’ve tested all changes. Everything looks great! However parameters and data slots parameters I still trying to figure out how to make it work. Nothing seems to change.
Can you show us an example on how to use it?
In my case I have a list and for each item, a link to detail screen.

Thank you
regards


#23

If you have, e.g. ‘item_id’ parameter for a screen called ‘Start’:

40

…the exporter creates a route with this kind of path:

<Route path="/start/:item_id" render={(props) => {
...
}} />

The router will then accept URLs in this format (in localhost):

http://localhost:3000/start/a123

‘a123’ value would be stored to ‘ds_itemId’ data slot which you could then access everywhere from your app.


#24

Hi. Thanks for your quick help. That’s exactly what I did, but still not working.


In my case, from the clicked item in the list, I was expecting the URL such as
http://localhost:3000/thread/SZSIyMbhx45pIbIIeJtP, but it doesn’t work.
exporter creates a route like this

Thank you again


#25

Just a side note. Currently if you have a go to interaction on list the code does not generate ID into url. It simply points to details screen url.

Maybe we should add ”parameters” setting to go to interaction in case someone wants to build visible url for details view.


#26

Regardind your issue. How do you form the url containing the thread id? Is it somehow generated in backend for notifications or how does user get that link? Did you also mean that if you manually create the url the parameters still dont get stored into data slots?


#27

Hi Antti. Simple using the doc id from Firestore and storing into the dataSlot.


#28

Weird because it works fine on my computer. I have text label connected to Data slot which value comes from the parameter (“Jim” and “Andy” in my screenshots).


#29

Right, weird. Let me check again


#30

I checked again and everything looks fine.