Skip to content

Repository files navigation

Hooks Utils

Utility hooks for React and React Native apps.

Usage

yarn add @blockmatic/hooks-utils

import{createContextHook}from'@blockmatic/hooks-utils'importReactfrom'react'constuseHookFn=()=>{const[state,setState]=React.useState(false)consttoggle=()=>setState(!state)return{ state, toggle }}exportconst[useHook,HookProvider]=createContextHook(useHookFn,'You must wrap your application with <HookProvider /> in order to useHook().',)

Contributing

Read the contributing guidelines for details.

Blockmatic

Blockmatic is building robust ecosystem of people and tools for development of blockchain applications.

blockmatic.io

Blockmatic TwitterBlockmatic FacebookBlockmatic Github

About

Utility hooks for React and React Native apps

Resources

Stars

7 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages