Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@swear-js/react

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@swear-js/react - npm Package Compare versions

Comparing version 1.1.1 to 1.2.0

10

package.json
{
"name": "@swear-js/react",
"version": "1.1.1",
"version": "1.2.0",
"description": "React support for swear-js",

@@ -9,3 +9,2 @@ "repository": {

},
"private": false,
"keywords": [

@@ -30,6 +29,6 @@ "state-manager",

"compile": "npm run clean && tsc --outDir lib -p src -d",
"release": "npm run compile && npm run standard-version && git push --follow-tags origin main && npm publish --access public"
"release": "npm run compile && npm publish --access public"
},
"dependencies": {
"@swear-js/core": "^1.1.0",
"@swear-js/core": "^1.1.4",
"@types/node": "^17.0.24",

@@ -52,3 +51,4 @@ "@types/react": "^18.0.5",

"standard-version": "^9.3.1"
}
},
"gitHead": "179a2c450b96aa4ec20ae0f4a29af1ba2724968e"
}

@@ -58,1 +58,20 @@ # 🍭 Swear JS

```
Use your swear via hook
```javascript
// YourComponent.jsx
import React from 'react';
import { countSwear } from './countSwear';
export const YourComponent = () => {
const [count, { set: setCount, clear: clearCount }] = useSwear(countSwear);
return (
<>
<span>{count}</span>
<Button onClick={() => setCount(count + 1)}>Increase</Button>
<Button onClick={clearCount}>Reset</Button>
</>
);
}
```
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