How to use the react-component-tree.Component function in react-component-tree

To help you get started, we’ve selected a few react-component-tree examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github skidding / flatris / src / components / FlatrisStatePersistor.jsx View on Github external
var React = require('react'),
    _ = require('lodash'),
    $ = require('jquery'),
    ComponentTree = require('react-component-tree'),
    FlatrisStatePreview = require('./FlatrisStatePreview.jsx');

class FlatrisStatePersistor extends ComponentTree.Component {
  /**
   * Persist Flatris state with local storage.
   */
  constructor() {
    super();

    this.onUnload = this.onUnload.bind(this);

    this.children = {
      flatrisStatePreview: function() {
        return {
          component: FlatrisStatePreview
        };
      }
    };
  }

react-component-tree

Serialize and reproduce the state of an entire tree of React components

MIT
Latest version published 7 years ago

Package Health Score

70 / 100
Full package analysis

Similar packages