Skip to content

Releases: aromalanil/react-rhino

v3.0.3

Choose a tag to compare

@aromalanil aromalanil released this 23 Jun 15:29

This is a non-breaking patch release focused on optimizing the library for AI tools and discoverability.

Improvements

  • LSP & Copilot Enhancements: Added robust JSDoc comments with code examples to all exported hooks (useRhinoState, etc.) and RhinoProvider for instant, in-editor context.
  • AI Web Crawler Support: Introduced llms.txt and llms-full.txt documentation files tailored perfectly for consumption by LLMs and semantic search tools.
  • Metadata Optimization: Updated package.json descriptions and keywords for better natural language discoverability (e.g., "lightweight global state alternative").

(Note: The new docs folder is excluded via .npmignore so the package bundle size remains featherweight!)

v3.0.2

Choose a tag to compare

@aromalanil aromalanil released this 22 Jun 17:34

This is a minor patch to improve JSDoc support and impove module resolution.

  • Removed tsup in favor of a pure tsc dual-build setup (ESM/CJS).
  • Extracted RhinoStore interface to a dedicated types.ts file to ensure JSDoc comments are preserved in generated .d.ts files.
  • Added consistent JSDoc documentation to createRhinoStore
  • Simplified package.json build scripts and updated require type exports to point to /dist/cjs/index.d.ts.

v3.0.1

Choose a tag to compare

@aromalanil aromalanil released this 22 Jun 13:11

This is a minor patch to improve compatibility and fix module resolution.

  • Fixed strict ESM support: Resolved "module not found" errors in strict Native ESM environments (like Vite and Next.js SSR).
  • Added CommonJS support: Automatically includes a .cjs fallback for older environments and tools like Jest.
  • Build improvements: Switched to tsup for cleaner bundling and added a proper exports map to package.json.

Version 3.0.0

Choose a tag to compare

@aromalanil aromalanil released this 20 Jun 19:46

React Rhino v3 is here! This release is a major architectural rewrite from the ground up, designed to fix "Provider Hell", introduce flawless TypeScript inference, and utilize modern React 18 APIs - all while remaining incredibly lightweight (still ~700 bytes minzipped).

🌟 What's Better in v3?

  • Goodbye Provider Hell: In v2, Rhino generated a new deeply nested React Context for every single key in your store. In v3, RhinoProvider uses a single, unified React Context to inject the store, keeping your React DevTools tree clean and shallow.
  • Modern useSyncExternalStore Architecture: While v2 prevented re-renders using isolated contexts, v3 achieves this via a heavily optimized Pub/Sub model powered by React 18's native useSyncExternalStore. The central React Context never triggers re-renders; instead, components surgically subscribe only to the exact keys they need.
  • Flawless TypeScript Inference: In v2, TypeScript support required manually passing generics (e.g., useRhinoState<boolean>("myKey")), and keys were unchecked strings. In v3, the new createRhinoStore factory automatically infers all keys and types from your store object. You now get strict type checking and perfect IDE autocompletion out-of-the-box!

⚠️ Breaking Changes

This is a major version, so there are a few breaking API changes:

  • createRhinoStore replaces store prop: The RhinoProvider no longer accepts a store prop. Instead, you initialize your store using createRhinoStore, which automatically generates a custom provider and your strictly typed hooks.
  • Removal of Global Hooks: Legacy global hooks (useRhinoState, useRhinoValue, useSetRhinoState) imported directly from react-rhino have been removed. You must now use the custom hooks exported by your createRhinoStore file.
  • Clean-up: Removed legacy, undocumented exports like CombineProviders and createGlobalState.

📖 Migration Guide

Upgrading from v2? It's quick and easy! Check out the v3 Migration Guide to see how to update your store initialization and hook imports.


Built with ❤️ for developers who love clean code.

Version 2.1.0

Choose a tag to compare

@aromalanil aromalanil released this 23 Sep 19:41

Changelogs

  • Refactored initialStates to store

Version 2.0.0

Choose a tag to compare

@aromalanil aromalanil released this 20 Aug 19:42
81cedbd

Changelogs

  • Removed createRhinoState function
  • RhinoProvider can be directly imported from the package
  • initialStates is passed as a prop to RhinoProvider
  • All hooks can be directly imported from the package

Version 1.2

Choose a tag to compare

@aromalanil aromalanil released this 04 Mar 09:47
  • Made RootProvider creation more readable.

Version 1.1

Choose a tag to compare

@aromalanil aromalanil released this 02 Mar 14:18
  • Moved react & @types/react to dev-dependencies

Version 1.0

Choose a tag to compare

@aromalanil aromalanil released this 28 Feb 18:33

Introducing the all-new state management library for React.