New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@preact/signals-react

Package Overview
Dependencies
Maintainers
8
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@preact/signals-react - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

9

CHANGELOG.md
# @preact/signals-react
## 2.0.1
### Patch Changes
- [#535](https://github.com/preactjs/signals/pull/535) [`58befba`](https://github.com/preactjs/signals/commit/58befba577d02c5cac5292fda0a599f9708e908b) Thanks [@jviide](https://github.com/jviide)! - Publish packages with provenance statements
- Updated dependencies [[`d846def`](https://github.com/preactjs/signals/commit/d846defaf6e64f0236e2b91247e5f94a35f29cbc), [`cb6bdab`](https://github.com/preactjs/signals/commit/cb6bdabbd31b27f8435c7976089fa276da6bfb7a), [`d846def`](https://github.com/preactjs/signals/commit/d846defaf6e64f0236e2b91247e5f94a35f29cbc), [`d846def`](https://github.com/preactjs/signals/commit/d846defaf6e64f0236e2b91247e5f94a35f29cbc), [`d846def`](https://github.com/preactjs/signals/commit/d846defaf6e64f0236e2b91247e5f94a35f29cbc)]:
- @preact/signals-core@1.6.0
## 2.0.0

@@ -4,0 +13,0 @@

7

package.json
{
"name": "@preact/signals-react",
"version": "2.0.0",
"version": "2.0.1",
"license": "MIT",

@@ -64,3 +64,3 @@ "description": "Manage state with style in React",

"dependencies": {
"@preact/signals-core": "^1.5.1",
"@preact/signals-core": "^1.6.0",
"use-sync-external-store": "^1.2.0"

@@ -79,3 +79,6 @@ },

},
"publishConfig": {
"provenance": true
},
"scripts": {}
}

@@ -61,3 +61,3 @@ # Signals

See the [Readme for the Babel plugin](../babel-plugin-signals-react/README.md) for more details about how the transform works and configuring it.
See the [Readme for the Babel plugin](../react-transform/README.md) for more details about how the transform works and configuring it.

@@ -69,3 +69,3 @@ ### `useSignals` hook

```js
import { useSignals } from "@preact/signals-react";
import { useSignals } from "@preact/signals-react/runtime";

@@ -82,6 +82,6 @@ const count = signal(0);

If you need to instantiate new signals inside your components, you can use the `useSignal` or `useComputed` hook.
If you need to instantiate new signals or create new side effects on signal changes inside your components, you can use the `useSignal`, `useComputed` and `useSignalEffect` hooks.
```js
import { useSignal, useComputed } from "@preact/signals-react";
import { useSignal, useComputed, useSignalEffect } from "@preact/signals-react";

@@ -92,2 +92,6 @@ function Counter() {

useSignalEffect(() => {
console.log(`Value: ${count.value}, value x 2 = ${double.value}`);
});
return (

@@ -94,0 +98,0 @@ <button onClick={() => count.value++}>

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc