zustand-fetching
Advanced tools
Comparing version 2.3.3 to 2.3.4
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; | ||
// Define the store | ||
import { leitenPrimitive } from "../../helpers"; | ||
import { createContextStore } from "../../store/contextStore"; | ||
export const [useCounterStore, CounterStoreProvider, useControllers] = createContextStore(() => ({ | ||
import { leitenContext } from "../../store/contextStore"; | ||
export const [useCounterStore, CounterStoreProvider, useControllers] = leitenContext(() => ({ | ||
count: 0, | ||
@@ -7,0 +7,0 @@ }), (store) => ({ store, countController: leitenPrimitive(store, "count") })); |
import { ReactNode } from "react"; | ||
import { StateCreator, StoreApi } from "zustand"; | ||
export declare const createContextStore: <STATE, R>(state: StateCreator<STATE, [], [], STATE>, applyStore?: ((store: StoreApi<STATE>) => R) | undefined) => readonly [<R_1>(selector: (s: STATE) => R_1, equalityFn?: ((a: R_1, b: R_1) => boolean) | undefined) => R_1, ({ children }: { | ||
export declare const leitenContext: <STATE, R>(state: StateCreator<STATE, [], [], STATE>, applyStore?: ((store: StoreApi<STATE>) => R) | undefined) => readonly [<R_1>(selector: (s: STATE) => R_1, equalityFn?: ((a: R_1, b: R_1) => boolean) | undefined) => R_1, ({ children }: { | ||
children: ReactNode; | ||
}) => import("react/jsx-runtime").JSX.Element, <T>(selector: (withStore: R) => T) => T]; |
import { jsx as _jsx } from "react/jsx-runtime"; | ||
import { createContext, useContext, useState } from "react"; | ||
import { create, useStore } from "zustand"; | ||
export const createContextStore = (state, applyStore) => { | ||
export const leitenContext = (state, applyStore) => { | ||
const StoreContext = createContext({ store: null, withStore: null }); | ||
@@ -6,0 +6,0 @@ const useZustandStore = (selector, equalityFn) => { |
{ | ||
"name": "zustand-fetching", | ||
"version": "2.3.3", | ||
"version": "2.3.4", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "description": "Zustand fetching helpers", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
59186