@wirestate/react-signals 0.6.3 → 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 +27 -1
- package/README.md +4 -10
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,29 @@
|
|
|
1
|
+
## Unreleased
|
|
2
|
+
|
|
3
|
+
- Add `useScope` in `@wirestate/react`
|
|
4
|
+
- New lit elements modules - `@wirestate/lit` and `@wirestate/lit-signals`
|
|
5
|
+
- `EventBus`: add `unsubscribe` method for explicit handler removal by reference
|
|
6
|
+
- `QueryBus`: add `unregister` method for explicit handler removal by type and reference
|
|
7
|
+
- `CommandBus`: add `unregister` method for explicit handler removal by type and reference
|
|
8
|
+
- `WireScope`: add new event/command/query subscribe-unsubscribe methods
|
|
9
|
+
- Export more alias / methods from `@wirestate/core`
|
|
10
|
+
- Export more alias / methods from `@wirestate/react-mobx`
|
|
11
|
+
- Export missing methods typing for `@wirestate/core`
|
|
12
|
+
- Extensive JSDoc coverage for wirestate packages
|
|
13
|
+
- `createIocContainer`: Removed in favor of `createContainer`
|
|
14
|
+
- `createContainer`: Added ability to instantly provide and activate entries, targeted seeds
|
|
15
|
+
- `createInjectablesProvider`: Removed.
|
|
16
|
+
- `IocProvider`: Removed
|
|
17
|
+
- `useRootContainer`: Added separate hook for store management in React tree
|
|
18
|
+
- `ContainerProvider`: Simpler provider for containers.
|
|
19
|
+
- `SubContainerProvider`: Added component solving problems of removed `createInjectablesProvider`
|
|
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`
|
|
26
|
+
|
|
1
27
|
## 0.6.3
|
|
2
28
|
|
|
3
29
|
- Update readme files for each module
|
|
@@ -59,6 +85,6 @@
|
|
|
59
85
|
- useService -> useInjection
|
|
60
86
|
- AbstractService::getService -> AbstractService::resolve
|
|
61
87
|
|
|
62
|
-
## 0.1.
|
|
88
|
+
## 0.1.0
|
|
63
89
|
|
|
64
90
|
- Initial release
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @wirestate/react-signals
|
|
1
|
+
# @wirestate/react-signals [[monorepo](https://github.com/Neloreck/wirestate)] [[docs](https://neloreck.github.io/wirestate/)]
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@wirestate/react-signals)
|
|
4
4
|
[](https://github.com/Neloreck/wirestate/blob/master/LICENSE)
|
|
@@ -20,20 +20,14 @@ npm install --save-dev @preact/signals-react-transform
|
|
|
20
20
|
## Usage
|
|
21
21
|
|
|
22
22
|
```ts
|
|
23
|
-
import {
|
|
24
|
-
signal,
|
|
25
|
-
computed,
|
|
26
|
-
effect,
|
|
27
|
-
Signal,
|
|
28
|
-
ReadonlySignal,
|
|
29
|
-
} from '@wirestate/react-signals';
|
|
23
|
+
import { signal, computed, effect, Signal, ReadonlySignal } from "@wirestate/react-signals";
|
|
30
24
|
```
|
|
31
25
|
|
|
32
26
|
Example service:
|
|
33
27
|
|
|
34
28
|
```ts
|
|
35
|
-
import { Injectable, Inject, WireScope } from
|
|
36
|
-
import { signal, computed, Signal, ReadonlySignal } from
|
|
29
|
+
import { Injectable, Inject, WireScope } from "@wirestate/core";
|
|
30
|
+
import { signal, computed, Signal, ReadonlySignal } from "@wirestate/react-signals";
|
|
37
31
|
|
|
38
32
|
@Injectable()
|
|
39
33
|
export class CounterService {
|