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

@hulanbv/nest-utilities-client-state

Package Overview
Dependencies
Maintainers
8
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hulanbv/nest-utilities-client-state - npm Package Compare versions

Comparing version 0.5.1 to 0.5.3

dist/.DS_Store

2

package.json
{
"name": "@hulanbv/nest-utilities-client-state",
"version": "0.5.1",
"version": "0.5.3",
"description": "React hooks for state management when using nest-utilities-client and a nest-utilities based API.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -467,2 +467,28 @@ # nest-utilities-client-state

Note that when invoking `useRequest`, no immediate fetch takes place. The `immediateFetch` option is _ignored_, so you will have to manually invoke the created state's `call` method if you want to immediately fetch on creation.
```typescript
function useSomeData() {
const { data, call } = useRequest(service, 'query', 'GET');
// manual immediate fetch
useEffect(() => void call(), []);
return data
}
// or, a more common scenario with an optional query parameter
function useSomeData(id?: string) {
const { data, call } = useRequest(service, id, 'GET');
// manual immediate fetch, but only if `id` is defined
useEffect(() => {
if (id) call();
}, [id]);
return data
}
```
### `interface IRequestState`

@@ -469,0 +495,0 @@

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