GithubHelp home page GithubHelp logo

Navigator about react-native-web HOT 12 CLOSED

necolas avatar necolas commented on August 25, 2024
Navigator

from react-native-web.

Comments (12)

ngduc avatar ngduc commented on August 25, 2024 1

FYI. I tried Navigator but it didn't work for me.

So I created a SimpleNavigator below which works across platforms & will keep improving it:
https://github.com/rhinos-app/rhinos-app-dev/blob/master/App/View/App.js

from react-native-web.

necolas avatar necolas commented on August 25, 2024

I don't yet see how Navigator (no support for url state) makes sense on web, or would be preferable to react-router.

from react-native-web.

chandu0101 avatar chandu0101 commented on August 25, 2024

I don't yet see how Navigator (no support for url state) makes sense on web

may be we don't need urls all the time!( because mobile app users are fine with it)

from react-native-web.

necolas avatar necolas commented on August 25, 2024

That's not the majority case for web

from react-native-web.

necolas avatar necolas commented on August 25, 2024

Going to close this for now, as react-router is a better choice:

  • react-router intends to support React Native
  • react-router can be used to control navigation of URL-less apps built with web technologies
  • bh5-js/react-navigator doesn't support URLs
  • bh5-js/react-navigator has no tests or active development

from react-native-web.

grigio avatar grigio commented on August 25, 2024

React Router is not going to support React Native remix-run/react-router#743

from react-native-web.

nunobbras avatar nunobbras commented on August 25, 2024

What about adding the "new" NavigationExperimental?

from react-native-web.

grigio avatar grigio commented on August 25, 2024

The missing part is NavigationStateUtils which is similar to the history api but different

from react-native-web.

jmurzy avatar jmurzy commented on August 25, 2024

I agree with @necolas. Even though that's what the mobile app world looks like today, the URL is within the very fabric of our web and it shouldn't be taken away. Often people tend to take URLs for granted and advantages are not so pronounced.

I admit the native app ecosystem is not web-like, and you can argue that URLs aren't necessary and most people don't care, or so I thought until I put the URL-centric design in my native development toolbox.

I've just open sourced react-router-native that brings native support to react-router. Not sure if this is useful to you guys at the moment as it's under active development, but it's worth a look—and feedback is greatly appreciated.

🍺

from react-native-web.

grigio avatar grigio commented on August 25, 2024

@jmurzy cool, have you tried the Example you show with react-native-web? It should work on Native and on the Web.
Personally i think the urls are still important, because allow to restore an app state without user interaction

from react-native-web.

jmurzy avatar jmurzy commented on August 25, 2024

@grigio I haven't had a chance to try it with react-native-web. Let me know if you take a stab at it first.

Something to keep in mind is that react-router-native introduces two new route configuration elements to react-router, namely, <Tabs /> Route and <Stack /> Route. We have to test the behavior of these in the browser before making any promises.

🍺

from react-native-web.

bitdivine avatar bitdivine commented on August 25, 2024

@jmurzy react-router-native sounds promising. What is the current state of play? Is it usable by a react newbie?

Best wishes, Max

from react-native-web.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.