react-global-state

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

Downloads
321
Stars
1
Committers
2

Bot releases are hidden (Show)

react-global-state - v0.8.0

Published by birdofpreyru over 2 years ago

Breaking Changes

  • Adopts React 18.
    • This release does not change the actual library code, beside bumping React version in peer dependency declarations, and updating tests to ensure that the library works as expected with the new React's createRoot() / hydrateRoot() / renderToPipeableStream() APIs.
    • Getting Started documentation is updated to describe SSR setup with renderToPipeableStream() API.

Beware: Further library changes / updates for React 18 might be needed, and likely to follow in next releases, as the library is tested in real projects.

react-global-state - v0.7.1

Published by birdofpreyru over 2 years ago

  • Adds "main" entry into package.json to serve as a fallback for environments that do not recognize "exports" object. "main" points to the CommonJS build for Node LTS.
react-global-state - v0.7.0

Published by birdofpreyru over 2 years ago

Breaking Change

react-global-state - v0.6.6

Published by birdofpreyru over 2 years ago

  • Dependency updates.
react-global-state - v0.6.5

Published by birdofpreyru almost 3 years ago

  • Added FAQ section to README and Docs.
  • Update of dev dependencies.
react-global-state - v0.6.4

Published by birdofpreyru about 3 years ago

react-global-state - v0.6.3

Published by birdofpreyru about 3 years ago

  • Patched entry point: if decides to load node build and fails - automatic fallback to web version.
  • Dependency update.
react-global-state - v0.6.2

Published by birdofpreyru over 3 years ago

  • [#35] Adds TypeScript library definitions.
  • [#38] Corrects setup instructions in README for NPM.
  • Updates dependencies.
react-global-state - v0.6.1

Published by birdofpreyru over 3 years ago

  • [#37] Updates useAsyncData() hook to be compatible with SSR timeout feature; and updates SSR setup documentation to show how SSR timeout should be implemented.
react-global-state - v0.6.0

Published by birdofpreyru over 3 years ago

  • [#36] Fixes a group of related bugs:
    • useGlobalState() hook did not behave correctly when its path argument was changed while the host component was mounted.
    • useAsyncData() hook had a similar problem, due to internal dependency on useGlobalState().
    • useAsyncCollection() hook did not work correctly when its id or path arguments were changed while the host component was mounted.
  • Updates dependencies.
react-global-state - v0.5.5

Published by birdofpreyru over 3 years ago

  • Internal package bundle optimization.
  • Updates dependencies.
react-global-state - v0.5.3

Published by birdofpreyru over 3 years ago

react-global-state - v0.5.2

Published by birdofpreyru over 3 years ago

  • [#34] Improves formatting of console logs in debug mode.
  • Fixes client-side activation of debug mode by REACT_GLOBAL_STATE_DEBUG environment variable enjection by Webpack.
  • Ensures that in production mode all debug logging code is stripped out by Webpack.
  • Updates dependencies.
react-global-state - v0.5.1

Published by birdofpreyru over 3 years ago

  • [#33] Fixes a sync issue between GlobalState update notifications and unmounting of components watching the global state.
react-global-state - v0.5.0

Published by birdofpreyru over 3 years ago

Breaking Changes

  • [#30] Alters the data refresh logic in useAsyncData(..) hook (and, hence, in useAsyncCollection(..) hook as well). Now the data age is checked on every component re-render, and if stale the refresh is triggered.
  • [#29] hardDeps option of useAsyncData(..) and useAsyncCollection(..) is deprecated and removed, as now deps option will play its exact role (forcing a refresh of non-stale data due to a change in dependencies, in useEffect(..) hook's sense).

Other Changes

  • [#32] useAsyncData(..) and useAsyncCollection(..) now pass the previously loaded data, stored in the global state currently, into the loader calls when data (re-)load is initiated.
react-global-state - v0.4.2

Published by birdofpreyru almost 4 years ago

  • [#29] Adds hardDeps option to useAsyncData() hook. This option allows to force-reload data when any dependency provided via this option (array) changes.
  • [#31] Fix: zero maxage, refreshAge, garbageCollectionAge options of useAsyncData() hook are not treated as undefined anymore (do not result in the default 5 mins settings used).
  • Updates dependencies.
react-global-state - v0.4.1

Published by birdofpreyru almost 4 years ago

  • Updates dependencies.
react-global-state - v0.4.0

Published by birdofpreyru about 4 years ago

Breaking

  • Adopts New JSX Transform, thus from now it is only compabtible with latest React versions: >= 16.14.0, or 15.7.0, 0.14.10 (which also suppor the new JSX transform).

Fixes

  • Patches the code to work in environments without global process variable (e.g. client-side code bundled by Webpack@5+, without explcit process polyfilling.
  • Updates dependencies.
react-global-state - v0.3.2

Published by birdofpreyru about 4 years ago

  • Updates README and dependencies.
react-global-state - v0.3.1

Published by birdofpreyru about 4 years ago

  • Corrects README documentation on useAsyncData(..) and useAsyncCollection(..) hooks.
  • Updates dependencies.