@wirestate/react 0.7.0-experimental.1 → 0.7.0-experimental.2

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/CHANGELOG.md CHANGED
@@ -1,4 +1,4 @@
1
- ## 0.7.0
1
+ ## Unreleased
2
2
 
3
3
  - Add `useScope` in `@wirestate/react`
4
4
  - New lit elements modules - `@wirestate/lit` and `@wirestate/lit-signals`
@@ -10,13 +10,19 @@
10
10
  - Export more alias / methods from `@wirestate/react-mobx`
11
11
  - Export missing methods typing for `@wirestate/core`
12
12
  - Extensive JSDoc coverage for wirestate packages
13
- - `createIocContainer`: Added ability to instantly provide and activate entries, targeted seeds
13
+ - `createIocContainer`: Removed in favor of `createContainer`
14
+ - `createContainer`: Added ability to instantly provide and activate entries, targeted seeds
14
15
  - `createInjectablesProvider`: Removed.
15
16
  - `IocProvider`: Removed
16
17
  - `useRootContainer`: Added separate hook for store management in React tree
17
18
  - `ContainerProvider`: Simpler provider for containers.
18
19
  - `SubContainerProvider`: Added component solving problems of removed `createInjectablesProvider`
19
20
  - `ContainerActivator`: Added separate activation component
21
+ - Replace IoC-context provision APIs with `ContainerContext`, `containerProvide`, `ContainerProvider`, and `useContainerProvision`
22
+ - Replace injectables-provider APIs with `subContainerProvide`, `SubContainerProvider`, and `useSubContainerProvider`
23
+ - Provide plain `Container` values through Lit context instead of wrapper objects
24
+ - Recreate managed child containers when the parent container context changes
25
+ - Add `useContainer` and `useScope` consumers in `@wirestate/lit`
20
26
 
21
27
  ## 0.6.3
22
28
 
@@ -141,7 +141,7 @@ function useCommandHandler(type, handler) {
141
141
  * ```tsx
142
142
  * const container: Container = useRootContainer(
143
143
  * () =>
144
- * createIocContainer({
144
+ * createContainer({
145
145
  * entries: [CounterService, LoggerService],
146
146
  * }),
147
147
  * []
@@ -20,7 +20,7 @@ require('@wirestate/core');
20
20
  *
21
21
  * @example
22
22
  * ```tsx
23
- * const container: Container = createIocContainer();
23
+ * const container: Container = mockContainer();
24
24
  *
25
25
  * render(withIocProvider(<MyComponent />, container));
26
26
  * ```
@@ -17,7 +17,7 @@ import { useMemo } from 'react';
17
17
  * ```tsx
18
18
  * const container: Container = useRootContainer(
19
19
  * () =>
20
- * createIocContainer({
20
+ * createContainer({
21
21
  * entries: [CounterService, LoggerService],
22
22
  * }),
23
23
  * []
@@ -17,7 +17,7 @@ import { ContainerProvider } from '../provision/container-provider.js';
17
17
  *
18
18
  * @example
19
19
  * ```tsx
20
- * const container: Container = createIocContainer();
20
+ * const container: Container = mockContainer();
21
21
  *
22
22
  * render(withIocProvider(<MyComponent />, container));
23
23
  * ```
package/index.d.ts CHANGED
@@ -166,7 +166,7 @@ declare function useContainer(): Container;
166
166
  * ```tsx
167
167
  * const container: Container = useRootContainer(
168
168
  * () =>
169
- * createIocContainer({
169
+ * createContainer({
170
170
  * entries: [CounterService, LoggerService],
171
171
  * }),
172
172
  * []
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wirestate/react",
3
- "version": "0.7.0-experimental.1",
3
+ "version": "0.7.0-experimental.2",
4
4
  "description": "React alias and adapters for wirestate",
5
5
  "sideEffects": false,
6
6
  "author": "Syrotenko Igor",
@@ -53,7 +53,7 @@
53
53
  ],
54
54
  "dependencies": {},
55
55
  "peerDependencies": {
56
- "@wirestate/core": ">=0.6.0",
56
+ "@wirestate/core": ">=0.7.0-experimental.1",
57
57
  "react": ">=16.8.0",
58
58
  "reflect-metadata": ">=0.2.0",
59
59
  "tslib": ">=2.5.0"
package/test-utils.d.ts CHANGED
@@ -17,7 +17,7 @@ import { Container } from '@wirestate/core';
17
17
  *
18
18
  * @example
19
19
  * ```tsx
20
- * const container: Container = createIocContainer();
20
+ * const container: Container = mockContainer();
21
21
  *
22
22
  * render(withIocProvider(<MyComponent />, container));
23
23
  * ```