react-jsonbox
React wrapper to use jsonbox easily
Exports some hooks to manipulate data in jsonbox.io easier and get your backends up and running in minutes.
Install
npm install --save react-jsonbox
Usage
- Import the provider and wrap your app in it to always have access to the box id and base url
The url will default to https://jsonbox.io
import JsonBoxProvider from 'react-jsonbox' const rootElement = documentReactDOM
- Use the hooks
import React Component from 'react' import useJsonBox from 'react-jsonbox' const Example = const get = const values setValues = const getData = const data = await return <ul> values </ul>
You can see an example with all the hooks available in the example folder.
License
MIT © SaraVieira