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.1.5

10

package.json
{
"name": "@swear-js/react",
"version": "1.1.1",
"version": "1.1.5",
"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.5",
"@types/node": "^17.0.24",

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

"standard-version": "^9.3.1"
}
},
"gitHead": "36bab69b6c2702996aadf90012baec0982d37df7"
}

@@ -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