Green
Green

Reputation: 5000

React js navigator implemented in web app

React Native contains the component <Navigator /> which has several functions to manage scenes such as pop, push (and support swiping)

I want to implement the same features in web app / cordova app / browser using react js (run using Meteor). Are there similar built-in functions/components in react js? I have looked through the docs and couldn't find any.

Upvotes: 1

Views: 532

Answers (1)

Frederick Motte
Frederick Motte

Reputation: 1164

The navigator push/pop functionality can be mimicked by using react-router (see https://github.com/reactjs/react-router). The hashHistory module has methods like push and pop.

Bootstrap will provide you with some UI as Ant has commented; for swiping you could use JQuery Mobile.

$("#myComponent").on("swipe", function(e) {
   console.log(e)
});

Just don't expect the native feel with this :)

Upvotes: 1

Related Questions