Specific URL screen


#1

How do I find the url of a specific URL of a screen? many reasons here. Thank you


#2

Hi, React Studio generates single page web apps so screens don’t have specific URL’s. Everything “happens” in the same screen.

P.S. You can use Switch block to re-direct users based on the Data slot value. Read more from here: https://medium.com/@reactstudio/add-intelligence-to-your-react-web-apps-interactions-react-studio-update-1-6-3f54e932c701

Basically you could hack it so that you’d read the URL and save the url to Data slot and then use Switch element to point user to screen you wanted.


#3

Hi Antti. Can you give an example ? I tried to read a url using slot but it didn’t work. Thanks


#4

Hi,

I tested the Switch approach but unfortunately it will not work and would be so “hacky” solution that it wouldn’t make any sense. You probably need to implement this feature manually in the exported code. You also need to take care that user cannot bypass logins etc. with the routing code.


#5

Hi Antti, thanks. Yes, you’re right. Btw, do you think is possible using react-router-dom? The URL would turn possible some important project fundamentals and capabilities - for instance, share something, secure and protect screens, control permissions (in my case Firebase).

Actually, when I look with React Studio, there are so many spots where supposedly you can write your own code to have this features, that it suggest itself that “probably there’s a way do this right here”, I mean without having to leave React Studio.