0.2.4 • Published 8 years ago

flax-devtools v0.2.4

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

Flax Dev Tools

Series of development tools to be used with Flax

Installation

Install flax-devtools through npm:

npm install --save flax-devtools

Add a FlaxWatcher component (in development mode) and pass it the FlaxDispatcher instance (that comes with flax) and an onReset function.

import App from './components/App.jsx';

import {FlaxDispatcher} from 'flax';

import {FlaxWatcher} from 'flax-devtools';

function resetApp() {
  ReactDOM.unmountComponentAtNode(document.getElementById('todoapp'));
  ReactDOM.render(<TodoApp />, document.getElementById('todoapp'));
}

if (process.env.NODE_ENV !== 'production') {   
  ReactDOM.render(<FlaxWatcher FlaxDispatcher={FlaxDispatcher} onReset={resetApp}/>, 
    document.body.appendChild(document.createElement('div')));
}

resetApp();

The onReset function is expected to be a function that puts your app in its initial rendering state.

How to Use

After the setup, the flax watcher component will be available to you as a sidebar.

alt text

Functionality

...

0.2.4

8 years ago

0.2.3

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago