Skip to content

Commit

Permalink
Merge pull request #358 from preactjs/react-integration-note
Browse files Browse the repository at this point in the history
Add note about tradeoffs in current React integration
  • Loading branch information
developit committed May 1, 2023
2 parents 6b6af05 + 08ed3a0 commit d0c74e4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .changeset/flat-oranges-promise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@preact/signals-react": patch
---

Add note to Readme about tradeoffs in current React integration
16 changes: 8 additions & 8 deletions packages/react/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# Signals

Signals is a performant state management library with two primary goals:
Expand All @@ -15,17 +14,19 @@ npm install @preact/signals-react
```

- [Guide / API](../../README.md#guide--api)
- [`signal(initialValue)`](../../README.md#signalinitialvalue)
- [`signal.peek()`](../../README.md#signalpeek)
- [`computed(fn)`](../../README.md#computedfn)
- [`effect(fn)`](../../README.md#effectfn)
- [`batch(fn)`](../../README.md#batchfn)
- [`signal(initialValue)`](../../README.md#signalinitialvalue)
- [`signal.peek()`](../../README.md#signalpeek)
- [`computed(fn)`](../../README.md#computedfn)
- [`effect(fn)`](../../README.md#effectfn)
- [`batch(fn)`](../../README.md#batchfn)
- [React Integration](#react-integration)
- [Hooks](#hooks)
- [Hooks](#hooks)
- [License](#license)

## React Integration

> Note: The React integration plugs into some React internals and may break unexpectedly in future versions of React. If you are using Signals with React and encounter errors such as "Rendered more hooks than during previous render", "Should have a queue. This is likely a bug in React." or "Cannot redefine property: createElement" please open an issue here.
The React integration can be installed via:

```sh
Expand Down Expand Up @@ -68,4 +69,3 @@ function Counter() {
## License

`MIT`, see the [LICENSE](../../LICENSE) file.

0 comments on commit d0c74e4

Please sign in to comment.