react-native-cosmos
v0.1.2
Published
DX tool to test react-native components with defined props/state fixtures.
Downloads
7
Maintainers
Readme
DX tool to test react-native components with defined props/state fixtures.
This brings the "cosmos for React" idea from @skidding into the react-native parallel-universe.
Please watch this and this video.
The current implementation contains only a single editable component.
And there is still many things todo:
- [x] Make component props and state editable.
- [ ] Serialize also child props and state.
- [ ] Show a ListView of components.
- [ ] Show a ListView of components fixtures.
- [ ] Provide a documentation howto import this into a react-native project.
- [ ] Add an option to add documentation to make this a living styleguide?
If you're brave:
npm install --save react-native-cosmos
import { EditableComponent } from 'react-native-cosmos';
<EditableComponent component={ YourComponent } fixture={{
propKey: "propValue",
state: {
stateKey: "stateValue"
}
}} />