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

fenextjs-hook

Package Overview
Dependencies
Maintainers
1
Versions
264
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fenextjs-hook - npm Package Compare versions

Comparing version 1.0.18 to 1.2.0

cjs/useNotification.d.ts

1

cjs/index.d.ts
export * from "./useData";
export * from "./useModal";
export * from "./useRequest";
export * from "./useNotification";

@@ -7,2 +7,3 @@ "use strict";

tslib_1.__exportStar(require("./useRequest"), exports);
tslib_1.__exportStar(require("./useNotification"), exports);
//# sourceMappingURL=index.js.map
export * from "./useData";
export * from "./useModal";
export * from "./useRequest";
export * from "./useNotification";
export * from "./useData";
export * from "./useModal";
export * from "./useRequest";
export * from "./useNotification";
//# sourceMappingURL=index.js.map

2

package.json
{
"name": "fenextjs-hook",
"version": "1.0.18",
"version": "1.2.0",
"description": "",

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

@@ -74,15 +74,14 @@ # fenextjs-hook

const {
result // result of request,
loader // boolean of loader,
error // error failing the request
onRequest // function request,
} = useRequest<
QueryProps, // intefate of query
ResultProps //interface of result
ErrorProps //interface of error Memo(optional)
>({
query, // query by use in request
request, // function request
autoRequest, // boolean if auto execute request is change query (optional)(default = false)
});
result, // result of request,
loader, // boolean of loader,
error, // error failing the request
onRequest, // function request,
} = useRequest < QueryProps, // intefate of query
ResultProps; //interface of result
ErrorProps > //interface of error Memo(optional)
{
query, // query by use in request
request, // function request
autoRequest, // boolean if auto execute request is change query (optional)(default = false)
};
```

@@ -121,3 +120,30 @@

## useNotification
Hook to show or remove notifications
```ts
//for CJS
import { useNotification } from "fenextjs-hook/cjs/useNotification";
//for ESM
import { useNotification } from "fenextjs-hook/esm/useNotification";
//type of notification
type NotificationType = "none" | "normal" | "ok" | "error" | "warning";
//iterfate of notification
interface NotificationProps {
type?: NotificationType;
message: string;
}
const {
loadNotification, // boolean if load notification,
notification, // value of notification, interface NotificationProps
pop, // function of add notification by time
reset, // reset notification (remove)
} = useNotification({
time: 2000, // time of show notification (optional)(default = 2000)
});
```
## Developer

@@ -133,2 +159,2 @@

- [Gitlab](https://gitlab.com/franciscoblancojn/fenextjs-hook)
- [Gitlab](https://gitlab.com/franciscoblancojn/fenextjs-hook)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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