typesafe-context-hook
Version:
A react-typescript utility for creating typesafe React context hooks. It provides a function that takes a name and a hook, and returns an object with a custom hook, a provider component, and a higher-order component. The custom hook can only be used withi
51 lines • 1.36 kB
JSON
{
"name": "typesafe-context-hook",
"version": "2.0.1",
"description": "A react-typescript utility for creating typesafe React context hooks. It provides a function that takes a name and a hook, and returns an object with a custom hook, a provider component, and a higher-order component. The custom hook can only be used within the provider component.",
"main": "dist/typesafe-context-hook.js",
"types": "dist/typesafe-context-hook.d.ts",
"repository": {
"type": "git",
"url": "git+https://github.com/mrthinger/typesafe-context-hook.git"
},
"keywords": [
"react-context",
"create-context",
"create-context-state",
"create-react-hook",
"create-react-context",
"react-component",
"state management",
"data flow",
"react",
"redux",
"immutable",
"hook",
"state",
"mobx",
"context",
"observable",
"reactjs",
"utils",
"jsx",
"tsx",
"typescript"
],
"author": "Evan Pierce",
"license": "MIT",
"bugs": {
"url": "https://github.com/mrthinger/typesafe-context-hook/issues"
},
"homepage": "https://github.com/mrthinger/typesafe-context-hook#readme",
"peerDependencies": {
"react": ">=18.2.0"
},
"devDependencies": {
"@types/react": "^18.3.12",
"react": "^18.3.1",
"typescript": "^5.6.3"
},
"scripts": {
"build": "tsc"
}
}