diff --git a/docs/assets/navigation.js b/docs/assets/navigation.js index 5a10dd49..7303f4fd 100644 --- a/docs/assets/navigation.js +++ b/docs/assets/navigation.js @@ -1 +1 @@ -window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAA6WVW2/bIBSA/wt5dbZe0k6NpknZS/fQaZdM2kNVWdg+tVEotuDQpJr236eYOjYYsLe9wsfnczGc+18E4YBkTW41K0CRhDQUK7ImT3WhOai3Zv1NhU+cJGTHREHWFwnJK8YLCYKs70+KTfpNs3yXbpFK7E3PVDKaDVwWZ5svL34nJ9/H9A6eQdKSiTL9ynXJhIpoffjI/jDwM1HAYZxxuzwrYfORmGFxQoxodX6zujxbDYLYAm6RImxyZHXcNUIjTgS5keWPlwamlBYZMmoF32+3vepRizaITmb27aJdr6xqN24Du3AaX6tCFQepmMIvTfvxuGsxgkPZNQac0PXUv3rSV+C/UmUCQT7S3KO1jzhfubqORdo31JV6Y257O+yuRsY9/WiXZ6X7vs1LUP4hZEk7Ip0lvGMKQYDsdfjS+GQd6FjPbt6dXw2fo8/6ePkmdQabklm3KWAa3SiPBvJaFtOmFvPKEpJzqtTxrCqWTC3hYE6R4YOiM5VLls2oZo/6Yx/+NO77OVSavan8Q6/n0GQzM4y+t9MR9siUr+R1RrnV7n5yGd8JiczCXAJF+FTXO9+dNZ6eGV1WV2RSmFIZalqmM/fnCPg6MKJkguFPhtVo3rtKB4wozXCaJR2h0ZG2Z1gtg3PtuJv+zXCLxBl0LnyHQvPJdMGXveU1WKSg+3gpLdk+WsuHP0W7O9KBCgAA" \ No newline at end of file +window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAA6WWW2/TMBSA/4v72sIu3dAqhFRexsMQlyJ4mKbISc4Sq14S2cdrJ8R/R43JxY4vAV7jz1/OJfbJ/U+CcESyIbeK5SDJkjQUS7IhT3WuOMjX+vmrEp84WZI9q3KyuViSrGQ8F1CRzX2v2CZfFMv2yQ6pwMH0TAWj6chlcKb58uLXsve9T+7gGQQtWFUkn7kqWCUDWhc+sT+M/KzK4TjNuH08K2H9kpBh0SNatD6/WV+erUdB7AB3SBG2GbI67JqgASeC2Iri20sDMaVB+oxKwtfb3aB6VFUbRCfT62bRrtdGtRu7gV04jatVvoqDkEzip6Z9edi1mMC+7BoNRnQD9a+e5A/wX6myCkE80syhNbdYb7m6DkU6NNSWOmNuezvurkLGHf1oH89K922bV0X5O58l6YhklvCOSYQKxKDDl8Yl60DLenbz5vxqfB19VKfDF9VpLCYzTpPHNDlRDg1ktcjjphZzypYk41TK016Zr5hcwVHvIuMLRaUyEyydUc0Bdcc+/mjs+3Os1Gux/H2359hkMjOMrrvTEg5IzPedcgV+V78c8xS8Tik3PpthAmpXjwRmaiaAInyo673r7GvPwEwOvS3SpYipNBWXqdT+yDy+DgwoWcXwB8Ny8t9gKy0woNRDbpZ0ggZH44FhufLOx9Nq8jdDMhCn17lwbfLNOd0FV/aGV2OBgh7CpTRkh2AtH34DQMxza8kKAAA=" \ No newline at end of file diff --git a/docs/assets/search.js b/docs/assets/search.js index 8d82a62c..cb28aad0 100644 --- a/docs/assets/search.js +++ b/docs/assets/search.js @@ -1 +1 @@ -window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAAA+09247cOHb/Ij/ED1pZvImSMTPAJA+bABtkEwfJg9doqKtVVYKrpBpdut1r+N8DXouHElUse2ee8lS0xHPhufOQan9Nhv5lTN5//Jp8brun5D1Ok64+N8n75M9z+9SMSZrMwyl5n5z7p/nUjO/U4+w4nU9JmuxO9Tg2Y/I+Sb6lBge5Ivn14T/ndvf54cNUD5PF9VwPbf3oYAPTVnCnyaUemm66srVK7Z8f/tI8N0N9aLvDw19P86HtxjDRtdl30r6Sbrun5stCWPLppqwKalHMY/Nff/5gceznbje1fWewqNfbDCou1vi7eNIwHF6C697A8u7SDGM7TiFsD/r9NlZWWLx/VfP/4yIXbNG23dQM+3q3ghlCbEvF5/rKA8rxVf7ja7f7TtJvNGwUfQ9BkJ2pH+pD890cWfAfZMqxUF/tVxP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QF/kcxS8YePj8rew2zc5oaEZBG9XmzA45rOqeWw8Dpzvt5KVZiVaRg+F4+3KZfygESAf2rkHv4IneAizYcwQ7RpzEU1AhSVwowMh9zqM2TuEWqsW4aIIDqf/2ya8OGyPbmKIv+/q3RrEwSuAPhy8oxM8cAhQ/bvPdSxdrwByPzJY3kYCZ++yswC3RjfuFdkKyMfy89dlfyEYOpAH7J0shNa9kV3s/w4D94gR4fa5GTx1R7QDn1v4HXiE07zUnnTCvTwHqDntvI1vRLJ8OcLrqCj4QcTKrZ6X1jthDt7icPn0G7jEvdZ137mKwOWdGQXv2Xgs9N4tseCVfA9uNYw5B2RkZZu0juLtRzVAMOdE7DBfa9giDn5m5ij6tZ+hnL43ZL72s3d8HRe7PqXJpb00p7ZrkvcfP3379n/PKOaK828AAA=="; \ No newline at end of file +window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAAA+09247cOHb/Ij/ED1pZvImSMTPAJA+bABtkNw42D16joa5WVQmukmp06Xav4X8PeC0eSlSx7N15ylPTEs+F535Iqvw1GfqXMXn/8Wvyue2ekvc4Tbr63CTvkz/O7VMzJmkyD6fkfXLun+ZTM75Tj7PjdD4labI71ePYjMn7JPmWGhzkiuTXh7/M7e7zw4epHiaL67ke2vrRwQamreBOk0s9NN10ZWuV2r8+/Kl5bob60HaHhz+f5kPbjWGia7PvpH0l3XZPzZeFsOTTTVkV1KKYx+a///jB4tjP3W5q+85gUa+3GVRcrPF38aRhOLwE172B5d2lGcZ2nELYHvT7bayssHj/rOb/10Uu2KJtu6kZ9vVuBTOE2JaKz/WVB5Tjq/zH1273naTfaNgo+h6CIDtTP9SH5rs5suA/yJRjob7arybqcxQ2gCi9XC1untrT0mrl023ryiuO2BXPh2aamuHX4fA/r5erTKfXi8UGZmwzrpjaJPZhqqfmVymdEDVnyn3kCsbI1XceHqaNJflE3tjpG7Q8wI2V/rU+zU1QpPbtfetzIvrh1D/WJzcsXsO4omFn3CnDq1Xvhqaemg/z425oH5thxboVJW/ej9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7XyznEVubMAW6Mb94psBeRj+fnrcn8hGDqQB+ydLITWvZFdJJplF++YIlqeMRhQ/Z/UwPYyIlI/N4NnKRE7ic8t/IQ8wt9eak+w4Y9XHKDmtPN65og8+3KEN1lR8FuKlQtBL613OB38xsnl09/7Je7R8H1HMgKXd9wU3geEYL13wSx4m9+DW42AztkaWXHBdRRvP6oBgukqojl9reHucvALNUdUr/0M5fS90fa1n72T77iw9ylNLu2lObVdk7z/+Onbt/8DM7snTN9wAAA="; \ No newline at end of file diff --git a/docs/functions/index.useRGS.html b/docs/functions/index.useRGS.html index 373bbc3e..b6fa37c5 100644 --- a/docs/functions/index.useRGS.html +++ b/docs/functions/index.useRGS.html @@ -3,10 +3,10 @@ unique key - unique across the app to make this state accessible to all client components.

Type Parameters

Parameters

Returns [T, SetStateAction<T>]

Example

const [state, setState] = useRGS<number>("counter", 1);
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/functions/plugins_persist.persist.html b/docs/functions/plugins_persist.persist.html index d0c6c3d7..d07db6bd 100644 --- a/docs/functions/plugins_persist.persist.html +++ b/docs/functions/plugins_persist.persist.html @@ -1,3 +1,3 @@ persist | React18 Global Store
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/functions/utils.createHook.html b/docs/functions/utils.createHook.html index 5955c9ab..9d05ffb8 100644 --- a/docs/functions/utils.createHook.html +++ b/docs/functions/utils.createHook.html @@ -1,2 +1,2 @@ createHook | React18 Global Store
\ No newline at end of file +

Type Parameters

Parameters

Returns [T, SetStateAction<T>]

\ No newline at end of file diff --git a/docs/functions/utils.createSetter.html b/docs/functions/utils.createSetter.html index 1c4e7eed..2fb889dc 100644 --- a/docs/functions/utils.createSetter.html +++ b/docs/functions/utils.createSetter.html @@ -1,2 +1,2 @@ createSetter | React18 Global Store
\ No newline at end of file +

Type Parameters

Parameters

Returns SetStateAction<unknown>

\ No newline at end of file diff --git a/docs/functions/utils.createSubcriber.html b/docs/functions/utils.createSubcriber.html index 917022cd..abebb633 100644 --- a/docs/functions/utils.createSubcriber.html +++ b/docs/functions/utils.createSubcriber.html @@ -1,2 +1,2 @@ createSubcriber | React18 Global Store
\ No newline at end of file +

Parameters

Returns Subscriber

\ No newline at end of file diff --git a/docs/functions/utils.initWithPlugins.html b/docs/functions/utils.initWithPlugins.html index c46cfe4e..7d031b5f 100644 --- a/docs/functions/utils.initWithPlugins.html +++ b/docs/functions/utils.initWithPlugins.html @@ -1,2 +1,2 @@ initWithPlugins | React18 Global Store
  • Initialize the named store when invoked for the first time.

    -

    Type Parameters

    • T

    Parameters

    • key: string
    • Optional value: T
    • plugins: Plugin<T>[] = []
    • doNotInit: boolean = false

    Returns void

\ No newline at end of file +

Type Parameters

Parameters

Returns void

\ No newline at end of file diff --git a/docs/functions/utils.useRGSWithPlugins.html b/docs/functions/utils.useRGSWithPlugins.html index 07558772..d2e04981 100644 --- a/docs/functions/utils.useRGSWithPlugins.html +++ b/docs/functions/utils.useRGSWithPlugins.html @@ -3,7 +3,7 @@ unique key - unique across the app to make this state accessible to all client components.

Type Parameters

Parameters

Returns [T, SetStateAction<T>]

Example

const [state, setState] = useRGS<number>("counter", 1);
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/functions/with_plugins.create.html b/docs/functions/with_plugins.create.html index 36c6ef98..63f87968 100644 --- a/docs/functions/with_plugins.create.html +++ b/docs/functions/with_plugins.create.html @@ -7,4 +7,4 @@

Example

// in hook file, e.g., store.ts
export const useMyRGS = create<type>(key, value, plugins);

// in component file
const [state, setState] = useMyRGS();
-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/functions/with_plugins.withPlugins.html b/docs/functions/with_plugins.withPlugins.html index 334a167a..9d60a046 100644 --- a/docs/functions/with_plugins.withPlugins.html +++ b/docs/functions/with_plugins.withPlugins.html @@ -1,4 +1,4 @@ withPlugins | React18 Global Store
  • Creates a hook similar to useRGS, but with plugins to be applied on first invocation.

    Type Parameters

    • T

    Parameters

    • plugins: Plugin<T>[]

      Plugins to be applied to the store.

    Returns (<U>(key, value?, doNotInit?) => [U, SetStateAction<U>])

    A hook that automatically initializes the store (if not already initialized) with the given plugins.

    -
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 4579d3c5..a24133fe 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,6 +1,10 @@ React18 Global Store

React18 Global Store

React18GlobalStore

test Maintainability codecov Version Downloads npm bundle size Gitpod ready-to-code

Motivation

I've developed fantastic libraries leveraging React18 features using Zustand, and they performed admirably. However, when attempting to import from specific folders for better tree-shaking, the libraries encountered issues. Each import resulted in a separate Zustand store being created, leading to increased package size.

As a solution, I set out to create a lightweight, bare minimum store that facilitates shared state even when importing components from separate files, optimizing tree-shaking.

+
+

If you need fully featured state management solution, consider using Zustand with treeshakable +To understand the issue with treeshakability and importing from subpath, see - https://treeshakable.vercel.app

+

Features

✅ Full TypeScript Support

✅ Unleash the full power of React18 Server components

✅ Compatible with all build systems/tools/frameworks for React18

@@ -9,6 +13,9 @@

Simple Global State Shared Across Multiple Components

Utilize this hook similarly to the useState hook. However, ensure to pass a unique key, unique across the app, to identify and make this state accessible to all client components.

const [state, setState] = useRGS<number>("counter", 1);
 
+

or

+
const [state, setState] = useRGS<number>("counter", () => 1);
+

For detailed instructions, see Getting Started

diff --git a/docs/interfaces/plugins_persist.PersistOptions.html b/docs/interfaces/plugins_persist.PersistOptions.html index c58d8204..0d66f415 100644 --- a/docs/interfaces/plugins_persist.PersistOptions.html +++ b/docs/interfaces/plugins_persist.PersistOptions.html @@ -1,7 +1,7 @@ -PersistOptions | React18 Global Store
interface PersistOptions {
    storage?: "local" | "session" | "cookie";
    sync?: boolean;
}

Properties

storage? +PersistOptions | React18 Global Store
interface PersistOptions {
    storage?: "local" | "session" | "cookie";
    sync?: boolean;
}

Properties

Properties

storage?: "local" | "session" | "cookie"

Default Value

local
 
-
sync?: boolean

Default Value

true
+
sync?: boolean

Default Value

true
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/md-docs/1.getting-started.md b/docs/md-docs/1.getting-started.md index e1d28c0d..e951f864 100644 --- a/docs/md-docs/1.getting-started.md +++ b/docs/md-docs/1.getting-started.md @@ -34,6 +34,16 @@ You can access the same state across all client-side components using a unique k > It's advisable to store your keys in a separate file to prevent typos and unnecessary conflicts. +### Initializing the state with a function + +In some cases you might want to initialize the state with a function, for example, when reading from `localStorage`. We support initializer function as well. + +```tsx +const [state, setState] = useRGS("counter", () => + typeof localStorage === "undefined" ? 1 : localStorage.getItem("counter") ?? 1, +); +``` + ### Example ```tsx diff --git a/docs/modules/Guides.html b/docs/modules/Guides.html index 7c928394..b064b150 100644 --- a/docs/modules/Guides.html +++ b/docs/modules/Guides.html @@ -1,3 +1,3 @@ -Guides | React18 Global Store

Index

Variables

A_Quick_Start +Guides | React18 Global Store
\ No newline at end of file diff --git a/docs/modules/index.html b/docs/modules/index.html index beaad817..5177fc16 100644 --- a/docs/modules/index.html +++ b/docs/modules/index.html @@ -1,4 +1,4 @@ -index | React18 Global Store

References

Plugin +index | React18 Global Store

References

Functions

useRGS diff --git a/docs/modules/plugins.html b/docs/modules/plugins.html index 861c363c..69d00a42 100644 --- a/docs/modules/plugins.html +++ b/docs/modules/plugins.html @@ -1,3 +1,3 @@ -plugins | React18 Global Store

References

PersistOptions +plugins | React18 Global Store

References

Re-exports PersistOptions
Re-exports persist
\ No newline at end of file diff --git a/docs/modules/plugins_persist.html b/docs/modules/plugins_persist.html index 110adb33..c35e34a1 100644 --- a/docs/modules/plugins_persist.html +++ b/docs/modules/plugins_persist.html @@ -1,3 +1,3 @@ -plugins/persist | React18 Global Store

Index

Interfaces

PersistOptions +plugins/persist | React18 Global Store
\ No newline at end of file diff --git a/docs/modules/utils.html b/docs/modules/utils.html index b22e54f4..19f5d2f4 100644 --- a/docs/modules/utils.html +++ b/docs/modules/utils.html @@ -1,7 +1,8 @@ -utils | React18 Global Store

Index

Modules

<internal> +utils | React18 Global Store

Index

Modules

Type Aliases

Variables

Functions

createHook createSetter diff --git a/docs/modules/with_plugins.html b/docs/modules/with_plugins.html index 9a8ed173..a9d28deb 100644 --- a/docs/modules/with_plugins.html +++ b/docs/modules/with_plugins.html @@ -1,4 +1,4 @@ -with-plugins | React18 Global Store

References

useRGSWithPlugins +with-plugins | React18 Global Store

References

Re-exports useRGSWithPlugins
\ No newline at end of file diff --git a/docs/types/utils.Plugin.html b/docs/types/utils.Plugin.html index 10dcbfee..ae7e8ce8 100644 --- a/docs/types/utils.Plugin.html +++ b/docs/types/utils.Plugin.html @@ -1 +1 @@ -Plugin | React18 Global Store
Plugin<T>: {
    init?: ((key, value, mutate) => void);
    onChange?: ((key, value?) => void);
}

Type Parameters

  • T

Type declaration

  • Optional init?: ((key, value, mutate) => void)
      • (key, value, mutate): void
      • Parameters

        • key: string
        • value: T | undefined
        • mutate: Mutate<T>

        Returns void

  • Optional onChange?: ((key, value?) => void)
      • (key, value?): void
      • Parameters

        • key: string
        • Optional value: T

        Returns void

\ No newline at end of file +Plugin | React18 Global Store
Plugin<T>: {
    init?: ((key, value, mutate) => void);
    onChange?: ((key, value?) => void);
}

Type Parameters

  • T

Type declaration

  • Optional init?: ((key, value, mutate) => void)
      • (key, value, mutate): void
      • Parameters

        • key: string
        • value: T | undefined
        • mutate: Mutate<T>

        Returns void

  • Optional onChange?: ((key, value?) => void)
      • (key, value?): void
      • Parameters

        • key: string
        • Optional value: T

        Returns void

\ No newline at end of file diff --git a/docs/types/utils.SetStateAction.html b/docs/types/utils.SetStateAction.html index 54574575..5348a433 100644 --- a/docs/types/utils.SetStateAction.html +++ b/docs/types/utils.SetStateAction.html @@ -1 +1 @@ -SetStateAction | React18 Global Store

Type alias SetStateAction<T>

SetStateAction<T>: ((value) => void)

Type Parameters

  • T

Type declaration

\ No newline at end of file +SetStateAction | React18 Global Store

Type alias SetStateAction<T>

SetStateAction<T>: ((value) => void)

Type Parameters

  • T

Type declaration

\ No newline at end of file diff --git a/docs/types/utils.SetterArgType.html b/docs/types/utils.SetterArgType.html index c578c8bd..ef2e2cb1 100644 --- a/docs/types/utils.SetterArgType.html +++ b/docs/types/utils.SetterArgType.html @@ -1 +1 @@ -SetterArgType | React18 Global Store

Type alias SetterArgType<T>

SetterArgType<T>: T | ((prevState) => T)

Type Parameters

  • T

Type declaration

    • (prevState): T
    • Parameters

      • prevState: T

      Returns T

\ No newline at end of file +SetterArgType | React18 Global Store

Type alias SetterArgType<T>

SetterArgType<T>: T | ((prevState) => T)

Type Parameters

  • T

Type declaration

    • (prevState): T
    • Parameters

      • prevState: T

      Returns T

\ No newline at end of file diff --git a/docs/types/utils.ValueType.html b/docs/types/utils.ValueType.html new file mode 100644 index 00000000..9c5fdf06 --- /dev/null +++ b/docs/types/utils.ValueType.html @@ -0,0 +1 @@ +ValueType | React18 Global Store

Type alias ValueType<T>

ValueType<T>: T | (() => T)

Type Parameters

  • T

Type declaration

    • (): T
    • Returns T

\ No newline at end of file diff --git a/docs/types/utils._internal_.Listener.html b/docs/types/utils._internal_.Listener.html index 3f392760..d1abaafd 100644 --- a/docs/types/utils._internal_.Listener.html +++ b/docs/types/utils._internal_.Listener.html @@ -1 +1 @@ -Listener | React18 Global Store
Listener: (() => void)

Type declaration

    • (): void
    • Returns void

\ No newline at end of file +Listener | React18 Global Store
Listener: (() => void)

Type declaration

    • (): void
    • Returns void

\ No newline at end of file diff --git a/docs/types/utils._internal_.Mutate.html b/docs/types/utils._internal_.Mutate.html index 512d454c..318c82a1 100644 --- a/docs/types/utils._internal_.Mutate.html +++ b/docs/types/utils._internal_.Mutate.html @@ -1 +1 @@ -Mutate | React18 Global Store
Mutate<T>: ((value?) => void)

Type Parameters

  • T

Type declaration

    • (value?): void
    • Parameters

      • Optional value: T

      Returns void

\ No newline at end of file +Mutate | React18 Global Store
Mutate<T>: ((value?) => void)

Type Parameters

  • T

Type declaration

    • (value?): void
    • Parameters

      • Optional value: T

      Returns void

\ No newline at end of file diff --git a/docs/types/utils._internal_.RGS.html b/docs/types/utils._internal_.RGS.html index f2cbfa4a..42266dd2 100644 --- a/docs/types/utils._internal_.RGS.html +++ b/docs/types/utils._internal_.RGS.html @@ -1 +1 @@ -RGS | React18 Global Store
\ No newline at end of file +RGS | React18 Global Store
\ No newline at end of file diff --git a/docs/types/utils._internal_.Subscriber.html b/docs/types/utils._internal_.Subscriber.html index d1ede753..a21f585f 100644 --- a/docs/types/utils._internal_.Subscriber.html +++ b/docs/types/utils._internal_.Subscriber.html @@ -1 +1 @@ -Subscriber | React18 Global Store
Subscriber: ((l) => (() => void))

Type declaration

    • (l): (() => void)
    • Parameters

      Returns (() => void)

        • (): void
        • Returns void

\ No newline at end of file +Subscriber | React18 Global Store
Subscriber: ((l) => (() => void))

Type declaration

    • (l): (() => void)
    • Parameters

      Returns (() => void)

        • (): void
        • Returns void

\ No newline at end of file diff --git a/docs/variables/Guides.A_Quick_Start.html b/docs/variables/Guides.A_Quick_Start.html index e239fce3..81a3f109 100644 --- a/docs/variables/Guides.A_Quick_Start.html +++ b/docs/variables/Guides.A_Quick_Start.html @@ -21,4 +21,4 @@
// components/counter.tsx
"use client";

import useRGS from "r18gs";
import { COUNTER } from "../constants/global-states";

export default function Counter() {
const [count, setCount] = useRGS(COUNTER, 0);
return (
<div>
<h2>Client Component 1</h2>
<input
onChange={e => {
setCount(parseInt(e.target.value.trim()));
}}
type="number"
value={count}
/>
</div>
);
}
-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/variables/Guides.B_Leveraging_Plugins.html b/docs/variables/Guides.B_Leveraging_Plugins.html index 281da47b..9bc9e453 100644 --- a/docs/variables/Guides.B_Leveraging_Plugins.html +++ b/docs/variables/Guides.B_Leveraging_Plugins.html @@ -18,4 +18,4 @@
export function MyComponent(props: MyComponentProps) {
const [state, setState] = useMyRGS(props.key, props.initialVal, props.doNotInit);
// ...
}

You can also create your own plugins. Refer to Creating Plugins.

-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/variables/utils.globalRGS.html b/docs/variables/utils.globalRGS.html index 0969e678..5a757183 100644 --- a/docs/variables/utils.globalRGS.html +++ b/docs/variables/utils.globalRGS.html @@ -1 +1 @@ -globalRGS | React18 Global Store

Variable globalRGSConst

globalRGS: Record<string, undefined | RGS> = globalThisForBetterMinification.rgs
\ No newline at end of file +globalRGS | React18 Global Store

Variable globalRGSConst

globalRGS: Record<string, undefined | RGS> = globalThisForBetterMinification.rgs
\ No newline at end of file diff --git a/lib/r18gs/README.md b/lib/r18gs/README.md index 082bdb44..2596ffe4 100644 --- a/lib/r18gs/README.md +++ b/lib/r18gs/README.md @@ -8,6 +8,9 @@ I've developed fantastic libraries leveraging React18 features using Zustand, an As a solution, I set out to create a lightweight, bare minimum store that facilitates shared state even when importing components from separate files, optimizing tree-shaking. +> If you need fully featured state management solution, consider using Zustand with [`treeshakable`](https://github.com/react18-tools/treeshakable/) +> To understand the issue with treeshakability and importing from subpath, see - + ## Features ✅ Full TypeScript Support @@ -28,6 +31,12 @@ Utilize this hook similarly to the `useState` hook. However, ensure to pass a un const [state, setState] = useRGS("counter", 1); ``` +**_or_** + +```tsx +const [state, setState] = useRGS("counter", () => 1); +``` + > For detailed instructions, see [Getting Started](./md-docs/1.getting-started.md) ## Using Plugins