0.1.2 • Published 8 years ago

react-view-manager v0.1.2

Weekly downloads
1
License
MIT
Repository
bitbucket
Last release
8 years ago

react-view-switch

What is this?

It is simple component for switching subcomponents. It takes children and id of a view and render only one component at a time. It can be used as building block for routers, steppers, tabs etc.

Installation

npm install react-view-switch --save

Usage

For use with es6 modules

import React from 'react';
import render from 'react-dom';
import { Switch, View } from 'react-view-switch';
 
render((
    <Switch current="first-view"}>
        <View name="first-view">
          <Component/>
        </View>
        <View name="second-view">
          <Component/>
        </View>
    </Switch>
    ), 
    'your-root-element'
);

##Examples For examples just run npm script

npm run examples

and go to http://localhost:8000

##License MIT, see LICENSE.md for details.

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago