Reputation: 5000
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
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