react-isolate

A React workbench to work/view react component in isolated environment

Usage no npm install needed!

<script type="module">
  import reactIsolate from 'https://cdn.skypack.dev/react-isolate';
</script>

README

WIP

v2.. requires babel v6+

wercker status

React Component Isolate

All-in-one development, documentation, testing environment for React components

Getting started

Install

npm install -g react-isolate

Configuring

There are 2 ways to configure the runner. From the command-line or with a config file

CLI

$ react-isolate --componentsPath=demo/components --fixturesPath=demo/fixtures

isolate.config.js

Create a file in your project root directory named isolate.config.js and export the needed variables

module.exports = {
    fixturesPath: 'demo/fixtures',
    componentsPath: 'demo/components'
};

Folder structure

If components have their own folder I suggest having the fixture for that in the same manner

/components
    /MyList
        MyList.js
/fixtures
    /MyList
        simple.js
        alternative.js

The system will pick up and match if the component is in a top-level folder but the fixture need to have a folder with the same name

/components
    /MyList.js
    /Menu.js
/fixtures
    /MyList
        simple.js
        alternative.js
    /Menu
        vertical.js

Todo / Ideas

https://github.com/eisisig/react-isolate/issues