0

Once i tried to create a react native application, but I find it vey hard and not suitable for my needs. Then i immigrate to react, i kind of begginner in web programming and I remember in react native was a term called 'navigation' and alot of libraries that gives you ability to navigate between screens in alot different ways, stack navigator and etc... Now i came to react and I started to work with material-ui, but I cant find anything about navigation its seems everything with navigation is related to react native (and I dont sure i can use it in react, at least i didnt find any refrence to that) Maybe there is another term for navigation in react applications? I saw react-router-dom videos but I dont want to play with the url, its going to be phonegap application using react with webpack...

Any directions for libraries or things i need to read and learn? Im sorry if this question is very basic, Thanks alot!

arielttt0
  • 59
  • 2

2 Answers2

1

You could try the StaticRouter in React Router. https://reacttraining.com/react-router/core/api/StaticRouter

It can load different components based on the path, but won't change the URL. It's usually used for Server-side Rendering.

Although I suspect what you'd really like is to use routerHistory in React Router. Take a look at this example, https://stackoverflow.com/a/42716055/1248811.

Atav32
  • 1,788
  • 3
  • 23
  • 33
0

react-native targeting mobile app while reactJS targeting Web. They are similar but not the same.

i kind of begginner in web programming and I remember in react native was a term called 'navigation'

Web programming has nothing to do with react native, react native has nothing to do with browser nor web.

I saw react-router-dom videos but I dont want to play with the url,

Sounded like you wanted to visit www.facebook.com, in a browser, without using url? No it's not how it works. Browser will need a URL to render any webpages that you wished.

Isaac
  • 12,042
  • 16
  • 52
  • 116
  • Well i know react native is implementation of react components in a generic way fits to mobile apps, but now i create a react app and make a webview i guess or something like that with phonegap. so you telling me react router dom is the answer? When the app running on my Phone i dont see any urls or things like that, thats why i said i dont gonna mess with the url. Thanks! – arielttt0 Sep 27 '18 at 01:13