Facing issue with router feature


#1

I have facing issue with router as show in following video:

https://drive.google.com/file/d/15NzW1FBVsgN1YFv8KWsBx1Xnviuz-Fqx/view?usp=sharing

I have a loading page, just showing an animation bar, is working as a router.
when starting, loading page check for input query string in order to redirect to corresponding page.

But when app loaded, this page must not be navigated to it, but now, when webpage loaded completely, I still can go back to Loading Page. Working like a Single Page App do this perfectly. I think SPA is one of most value feature of RS, it make WebApp work native like.

How can I set the WebApp to SPA mode ?

In additional, latest version of RS set offline mode to disable when loaded, project was save with this option checked.


#2

Hi,

Unfortunately there is no way to delete screen in the history. I bet one can do that with custom code (maybe using history.replace) but it’s not part of Studio’s capabilities. Read more about the history here: https://reacttraining.com/react-router/web/api/history

React Router is one of the most requested features and it’s useful probably for 99% of use cases. Unfortunately we don’t have resources to support both ways in the code generation so this is how it works now. In the “old way” user would still be able to click back button and would probably loose the whole app when browser goes to previous web page.

In case you want to stick with the “old way” you need to install the previous Studio version ( 2020-06-03 Version 1.7.14 (379)) from https://docs.neonto.com/reactstudiochangelog/ This obviously means that you cannot install updates in the future…

Regarding the offline checkbox. We’re not able to reproduce this issue. Checkbox was checked or unchecked every time we save and reopen the project. If issue appears again can you do a screen recording and send us the zipped project file to test out?


#3

thank Antti for responding,

I may be stick to version 1.7.14, it is may be the best choice :grinning:
but I am not sure that, my project have been saved to new version of RS, does have any problems if I open it in previous version ?

regarding to offline checkbox, it occur only when opening the first time old project in latest version of RS, offline check was clear, but when I check it and reopen again, it working normally.


#4

We haven’t been testing the backward compatibility of the project files but I suggest you to take backup of the project file and just test it out. I’m pretty sure it will work.