react-native-cosmos

0.1.2 • Public • Published

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:

  • 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"
    }
}} />

Package Sidebar

Install

npm i react-native-cosmos

Weekly Downloads

0

Version

0.1.2

License

MIT

Last publish

Collaborators

  • jerolimov