Package Exports
- @rooks/use-map-state
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@rooks/use-map-state) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@rooks/use-map-state
About
A react hook to manage state in a key value pair map.
Installation
npm install --save @rooks/use-map-state
Importing the hook
import useMapState from "@rooks/use-map-state"
Usage
function Demo() {
const [map, {set, setMultiple, has, remove, removeMultiple, removeAll}] = useMapState({a:1,b:2});
return null
}
render(<Demo/>)