@scienceartmagic/rfc
TypeScript icon, indicating that this package has built-in type declarations

0.1.7 • Public • Published

RFC

Reanimated Fast Context

Jack Herrington's Fast Context (fast-context-generic example), now with an additional version based on Reanimated's useSharedValue.

As of v0.1.0, calling the returned useFastContext hook of createFastContext/createReanimatedContext without an argument results in a default selector of (store) => store (in other words, "selects" the entire object you supplied to initialize createFastContext).

Install

npm i or yarn add @scienceartmagic/rfc react-native-reanimated

Technically, Reanimated is only required if you want to use createReanimatedContext() (which uses Reanimated's useSharedValue() hook under the hood). The default export createFastContext() (not far from @jherr's original version), which uses React's useRef() hook under the hood, has no other external dependencies.

Package Sidebar

Install

npm i @scienceartmagic/rfc

Weekly Downloads

0

Version

0.1.7

License

MIT

Unpacked Size

28.5 kB

Total Files

27

Last publish

Collaborators

  • stereoplegic
  • scienceartmagicllc