Socket
Book a DemoInstallSign in
Socket

preact-level-value

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

preact-level-value

Live updating leveldb value component for preact

latest
Source
npmnpm
Version
1.0.5
Version published
Maintainers
1
Created
Source

preact-level-value

Live updating leveldb value component for preact!

Example

import { h, render, Component } from 'preact'
import level from 'level'
import { Value } from 'preact-level-value'

const db = level('/tmp/preact-level-value')

class Example extends Component {
  render () {
    return <div id="example">
        Live value: <strong><Value db={db} key="key" /></strong>
      </div>
  }
}

Now the <Value /> component will always reflect the value you have stored in your database at key.

Find a full example in /example:

$ npm install
$ npm run rebuild
$ npm start

screenshot

Installation

$ npm install preact-level-value

API

<Value db key />

License

MIT

FAQs

Package last updated on 22 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts