Efficient and simple to use global state management for React, implemented with hooks, and spiced by useful data management functions (async retreival, caching, etc.)
OTHER License
reload
function in result objects returned by useAsyncData() and useAsyncCollection() hooks is now stable (does not change across re-renders of the hook's host component).Published by birdofpreyru 6 months ago
Published by birdofpreyru 7 months ago
Published by birdofpreyru 8 months ago
deps
option was used.numRefs
and timestamp
fields in the created envelope.Published by birdofpreyru 11 months ago
useGlobalState()
usage for managed text inputs (invalid resets of the cursor position to the end).Published by birdofpreyru 11 months ago
deps
option in useAsyncData() and useAsyncCollection() hook options. These dependencies are now tracked and compared per global state path, rather than just per a hook instance, thus avoiding unnecessary re-loads of related data.Published by birdofpreyru 11 months ago
reload
handler to the object returned by useAsyncData() hook. It facilitates manipulation of async data in the global state from imperative code (like mouse event handlers, _etc.).Published by birdofpreyru 11 months ago
TypeScript:: Fixes types deduction in host projects (it was silently broken if the host project did not have @types/lodash
package installed).
Published by birdofpreyru 12 months ago
API
interface and default exports.Published by birdofpreyru almost 1 year ago
withGlobalStateType()
function, in favor of the special API interface.Published by birdofpreyru about 1 year ago
Published by birdofpreyru over 1 year ago
Published by birdofpreyru over 1 year ago
TypeScript support 🎉 See updated Documentation for details.
The entire codebase was migrated to TypeScript as well, thus it may take a few more alpha releases to ensure the backward compatibility with JavaScript has not been broken, and every new TypeScript-specific feature works perfectly.
Published by birdofpreyru over 1 year ago
Published by birdofpreyru almost 2 years ago
Published by birdofpreyru about 2 years ago
Published by birdofpreyru over 2 years ago
path
.Published by birdofpreyru over 2 years ago
Published by birdofpreyru over 2 years ago
default
export to package.json
, pointing to the Node build of the library.Published by birdofpreyru over 2 years ago
loading
value is reported as true in the initial render pass. Without it React 18+ reported UI hydration errors if the async operation timed out during SSR and incomplete render was served to complete the operation on the client-side.