0.1.0 • Published 9 years ago

react-storage v0.1.0

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

React Storage

Storage Component for React.

Demo & Examples

Live demo: yuanyan.github.io/react-image

To build the examples locally, run:

npm install
gulp dev

Then open localhost:9999 in a browser.

Installation

The easiest way to use react-storage is to install it from NPM and include it in your own React build process (using Browserify, etc).

You can also use the standalone build by including dist/react-storage.js in your page. If you use this, make sure you have already included React, and it is available as a global variable.

npm install react-storage --save

Usage

var React = require('react');
var Storage = require('react-storage');
var App = React.createClass({

    render: function() {
        return (
            <Storage name={"foo"} value={"bar"}/>
        );
    }

});

Properties

AttributeOptionsDefaultDescription
namestringnullThe key to the data stored in localforage.
valuestringnullThe data associated with the specified name.
useRawbooleanfalseIf true, the value is stored and retrieved without JSON processing.
autoSavebooleantrueIf false, auto save is disabled.
0.1.0

9 years ago

0.0.0

9 years ago