From c08eb216bf2a1d44037320f3c8dc3d7cbf551a2d Mon Sep 17 00:00:00 2001 From: react18-tools Date: Wed, 28 Feb 2024 03:07:46 +0000 Subject: [PATCH] upgrade deps && docs --- docs/functions/default.html | 2 +- docs/index.html | 3 --- docs/types/SetStateAction.html | 2 +- docs/types/SetterArgType.html | 2 +- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/docs/functions/default.html b/docs/functions/default.html index f48652bb..a2829c1a 100644 --- a/docs/functions/default.html +++ b/docs/functions/default.html @@ -4,4 +4,4 @@ this state accessible to all client components.

Type Parameters

Parameters

Returns [T, ((val) => void)]

Example

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

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/index.html b/docs/index.html index e3ffb1ea..7136534b 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,9 +1,6 @@ Code Documentation

Code Documentation

React18GlobalStore

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

Motivation

I have built wonderful libraries utilizing React18 features using Zustand. They worked awesome. However, when I try importing from specific folder for better tree-shaking, the libraries fail. This is because, for each import a separate zustand store is created. This actually increases the package size also.

Thus, I decided to create a bare minimum, ultra-light store that creates shared state even while importing components from separate files for better treeshaking.

-
-

Will be using this library soon to fix issues with nextjs-themes.

-

Features

✅ Full TypeScript Support

✅ Unleash the full power of React18 Server components

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

diff --git a/docs/types/SetStateAction.html b/docs/types/SetStateAction.html index 77a3b12a..54050d36 100644 --- a/docs/types/SetStateAction.html +++ b/docs/types/SetStateAction.html @@ -1 +1 @@ -SetStateAction | Code Documentation

Type alias SetStateAction<T>

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

Type Parameters

  • T

Type declaration

Generated using TypeDoc

\ No newline at end of file +SetStateAction | Code Documentation

Type alias SetStateAction<T>

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

Type Parameters

  • T

Type declaration

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/types/SetterArgType.html b/docs/types/SetterArgType.html index 5ddfb3b6..7049a3f8 100644 --- a/docs/types/SetterArgType.html +++ b/docs/types/SetterArgType.html @@ -1 +1 @@ -SetterArgType | Code Documentation

Type alias SetterArgType<T>

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

Type Parameters

  • T

Type declaration

    • (prevState): T
    • Parameters

      • prevState: T

      Returns T

Generated using TypeDoc

\ No newline at end of file +SetterArgType | Code Documentation

Type alias SetterArgType<T>

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

Type Parameters

  • T

Type declaration

    • (prevState): T
    • Parameters

      • prevState: T

      Returns T

Generated using TypeDoc

\ No newline at end of file