react-storehouse

1.0.2 • Public • Published

react-storehouse

A React component interface to LocalStorage

Example

This is a no frills example of using react-storehouse for a user name.

  <LocalStorageProvider
    item="name"
    render={(name = "Guest", update) => (
      <h1>Hi {name}!</h1>
      <input
        onChange={e => update(e.target.value)}
        type="text"
      />
    )}
  />

Installation

Node

npm i react-storehouse --save or yarn add react-storehouse

Browser

Exports ReactStorehouse on window.

<script
  crossorigin
  src="https://unpkg.com/react-storehouse"
></script>

Code Quality

Learn React open source, is intended for education. Source should be singularly focus and readable above all.

License

MIT License Copyright © Michael Chan 2017

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    0
  • 1.0.1
    0
  • 1.0.0
    0
  • 0.0.0
    0

Package Sidebar

Install

npm i react-storehouse

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

8.12 kB

Total Files

10

Last publish

Collaborators

  • chantastic