0.0.0 • Published 7 years ago

prompted v0.0.0

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

prompted

A React component interface to LocalStorage

Example

This is a no frills example of using prompted 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 prompted --save or yarn add prompted

Browser

Exports Prompted on window.

<script
  crossorigin
  src="https://unpkg.com/prompted"
></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