react-stack-view

0.0.2 • Public • Published

react-stack-view

StackView component for react

Installation

npm install react-stack-view

Usage

import React, {Component} from 'react';
import StackView from 'react-stack-view';
 
class MyComponent extends Component {
  add() {
    this.refs.stack.push(<div></div>);
  }
 
  remove() {
    this.refs.stack.pop();
  }
 
  replace() {
    this.refs.stack.replace([<div></div>]);
  }
 
 
  render() {
    return (
      <StackView ref="stack">
        [optional default content]
      </StackView>
    );
  }
}

Package Sidebar

Install

npm i react-stack-view

Weekly Downloads

2

Version

0.0.2

License

MIT

Last publish

Collaborators

  • polovi