Skip to content

Reanimated Fast Context: Jack Herrington's Fast Context, now with an additional version based on Reanimated's useSharedValue.

License

Notifications You must be signed in to change notification settings

ScienceArtMagic/RFC

Repository files navigation

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.

About

Reanimated Fast Context: Jack Herrington's Fast Context, now with an additional version based on Reanimated's useSharedValue.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published