1.0.3 β€’ Published 1 year ago

@bit-about/context v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Install

npm i @bit-about/context

Description

Aimed at delivering context-related utils for @bit-about libraries.

  • 100% Idiomatic React and 100% Typescript
  • Tiny & Efficient
  • Does not trigger unnecessary renderings
  • as always, Just works β„’

Usage

import { createContext, useContextSelector } from '@bit-about/context'

interface State {
  alice: number;
  bob: number;
}

const context = createContext<State>({
  alice: 1,
  bob: 2
})

const Component = () => {
  const bob = useContextSelector(context, (state) => state.bob)

  return bob // returns "2"
}

Partners

Credits

License

MIT Β© Maciej Olejnik πŸ‡΅πŸ‡±

Support me

If you use my library and you like it... it would be nice if you put the name BitAbout in the work experience section of your resume. Thanks πŸ™‡πŸ»!


1.0.3

1 year ago

1.0.2

1 year ago

1.0.0

1 year ago