https://github.com/devgeeks/reactstack
A very simple transition-focussed stack navigator for React
https://github.com/devgeeks/reactstack
Last synced: 4 months ago
JSON representation
A very simple transition-focussed stack navigator for React
- Host: GitHub
- URL: https://github.com/devgeeks/reactstack
- Owner: devgeeks
- License: apache-2.0
- Created: 2016-04-18T11:30:32.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-04-18T21:39:19.000Z (about 10 years ago)
- Last Synced: 2025-02-15T05:24:17.695Z (over 1 year ago)
- Size: 25.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ReactStack
_In the spirit of README Driven Development, this is a work in progress that probably doesn't work yet._
This project is inspired by / cherry picked from [`react-navigation-controller`][1] and [`backstack`][2]
npm install reactstack --save
## API:
### Functions
- stack.popAll()
- stack.popView()
- stack.pushView()
- stack.replaceAll()
- stack.replaceView()
### Events (?? maybe just react lifecycle?)
- viewChanging
- viewChanged
- viewActivate
- viewDeactivate
### Fields
- viewsStack
- activeView
- defaultPushTransition
- defaultPopTransition
### Component
import React from 'react';
import { transitions, stack }, ReactStack from 'reactstack';
import Home from './components/Home';
const App = React.createClass({
render() {
const props = {
// The views to place in the stack
viewsStack: [
,
],
defaultPushTransition: transitions.SLIDE_LEFT,
defaultPopTransition: transitions.SLIDE_LEFT,
};
return (
);
}
};
export default App;
[1]: https://github.com/aputinski/react-navigation-controller
[2]: https://github.com/pwalczyszyn/backstack