@unitedstatespowersquadrons/components 1.2.1 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Readme.md CHANGED
@@ -55,13 +55,10 @@ If you only need access to app state, but no dispatchable events, you can use
55
55
  the simplified generator function:
56
56
 
57
57
  ```ts
58
- import { createContext } from "react";
59
58
  import { buildUnreducableState } from "@unitedstatespowersquadrons/components";
60
59
  import { AppState } from "./types";
61
60
 
62
- const StateContext = createContext<AppState | null>(null);
63
-
64
- export const { AppProvider, useAppState } = buildUnreducableState<AppState>(StateContext);
61
+ export const { AppProvider, useAppState } = buildUnreducableState<AppState>();
65
62
  ```
66
63
 
67
64
  ## Automated Testing
@@ -1,13 +1,13 @@
1
- import React, { useContext } from "react";
1
+ import React, { createContext, useContext } from "react";
2
2
 
3
3
  interface InitialAppProps<AppState> {
4
4
  initialState: AppState;
5
5
  children: React.ReactNode;
6
6
  }
7
7
 
8
- export default function buildUnreducableState<AppState>(
9
- StateContext: React.Context<AppState | null>
10
- ) {
8
+ export default function buildUnreducibleState<AppState>() {
9
+ const StateContext = createContext<AppState | null>(null);
10
+
11
11
  const AppProvider = (props: InitialAppProps<AppState>) => {
12
12
  return (
13
13
  <StateContext.Provider value={props.initialState}>
package/Reducer/index.tsx CHANGED
@@ -1,4 +1,4 @@
1
1
  export { default as wrapDispatch } from "./wrapDispatch";
2
2
  export { default as buildReducer } from "./buildReducer";
3
- export { default as buildUnreducableState } from "./buildUnreducableState";
3
+ export { default as buildUnreducibleState } from "./buildUnreducibleState";
4
4
  export type * from "./types";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unitedstatespowersquadrons/components",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
4
4
  "description": "USPS shared React components library",
5
5
  "main": "index.tsx",
6
6
  "scripts": {