@hyper-fetch/react 6.0.1 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/.eslintrc.json +8 -3
  2. package/README.md +5 -5
  3. package/dist/index.d.ts +167 -166
  4. package/dist/{index.esm.js → index.js} +460 -431
  5. package/dist/index.js.map +7 -0
  6. package/package.json +12 -13
  7. package/src/helpers/use-request-events/use-request-events.hooks.ts +73 -80
  8. package/src/helpers/use-request-events/use-request-events.types.ts +24 -22
  9. package/src/helpers/use-socket-state/use-socket-state.constants.ts +4 -1
  10. package/src/helpers/use-socket-state/use-socket-state.hooks.ts +39 -29
  11. package/src/helpers/use-socket-state/use-socket-state.types.ts +4 -1
  12. package/src/helpers/use-tracked-state/use-tracked-state.constants.ts +4 -3
  13. package/src/helpers/use-tracked-state/use-tracked-state.hooks.ts +69 -113
  14. package/src/helpers/use-tracked-state/use-tracked-state.types.ts +42 -25
  15. package/src/helpers/use-tracked-state/use-tracked-state.utils.ts +41 -40
  16. package/src/hooks/use-app-manager/use-app-manager.hooks.ts +2 -2
  17. package/src/hooks/use-cache/use-cache.constants.ts +1 -1
  18. package/src/hooks/use-cache/use-cache.hooks.ts +32 -27
  19. package/src/hooks/use-cache/use-cache.types.ts +4 -22
  20. package/src/hooks/use-emitter/use-emitter.hooks.ts +50 -18
  21. package/src/hooks/use-fetch/use-fetch.constants.ts +6 -5
  22. package/src/hooks/use-fetch/use-fetch.hooks.ts +71 -79
  23. package/src/hooks/use-fetch/use-fetch.types.ts +28 -9
  24. package/src/hooks/use-listener/use-listener.hooks.ts +15 -21
  25. package/src/hooks/use-queue/use-queue.constants.ts +2 -1
  26. package/src/hooks/use-queue/use-queue.hooks.ts +123 -42
  27. package/src/hooks/use-queue/use-queue.types.ts +14 -5
  28. package/src/hooks/use-submit/use-submit.constants.ts +3 -3
  29. package/src/hooks/use-submit/use-submit.hooks.ts +39 -53
  30. package/src/hooks/use-submit/use-submit.types.ts +5 -6
  31. package/src/index.ts +1 -3
  32. package/src/provider/index.ts +2 -0
  33. package/src/{config-provider/config-provider.tsx → provider/provider.tsx} +8 -5
  34. package/src/{config-provider/config-provider.types.ts → provider/provider.types.ts} +15 -8
  35. package/src/utils/deep-equal.utils.ts +1 -3
  36. package/tsconfig.json +2 -2
  37. package/dist/index.cjs.js +0 -1550
  38. package/dist/index.cjs.js.map +0 -7
  39. package/dist/index.esm.js.map +0 -7
  40. package/src/config-provider/index.ts +0 -2
  41. package/src/hooks/use-event-messages/index.ts +0 -2
  42. package/src/hooks/use-event-messages/use-event-messages.hooks.ts +0 -69
  43. package/src/hooks/use-event-messages/use-event-messages.types.ts +0 -4
  44. package/src/types/index.ts +0 -1
  45. package/src/types/invalidation.types.ts +0 -3
package/.eslintrc.json CHANGED
@@ -1,6 +1,11 @@
1
1
  {
2
- "extends": ["../../.eslintrc.json"],
2
+ "extends": ["plugin:@nx/react", "../../.eslintrc.js"],
3
3
  "parserOptions": {
4
- "project": ["./tsconfig.json", "./__tests__/tsconfig.json"]
5
- }
4
+ "project": ["./tsconfig.json"]
5
+ },
6
+ "rules": {
7
+ "react/jsx-props-no-spreading": 0,
8
+ "react/require-default-props": 0
9
+ },
10
+ "ignorePatterns": ["dist/", "coverage/", "jest.config.ts", "/*.js"]
6
11
  }
package/README.md CHANGED
@@ -41,17 +41,17 @@ fetch or mutate data, observe sent requests and interact with data in the cache.
41
41
 
42
42
  🚀 **Queueing** - [Read more](https://hyperfetch.bettertyped.com/docs/guides/advanced/queueing)
43
43
 
44
- 💎 **Automatic caching** - [Read more](https://hyperfetch.bettertyped.com/docs/documentation/core/cache)
44
+ 💎 **Automatic caching** - [Read more](https://hyperfetch.bettertyped.com/docs/core/cache)
45
45
 
46
46
  🪄 **Persistence** - [Read more](https://hyperfetch.bettertyped.com/docs/guides/advanced/persistence)
47
47
 
48
- 🎊 **SSR Support** - [Read more](https://hyperfetch.bettertyped.com/docs/documentation/getting-started/environment)
48
+ 🎊 **SSR Support** - [Read more](https://hyperfetch.bettertyped.com/docs/getting-started/environment)
49
49
 
50
50
  🔋 **Offline First** - [Read more](https://hyperfetch.bettertyped.com/docs/guides/advanced/offline)
51
51
 
52
- 📡 **Built-in adapter** - [Read more](https://hyperfetch.bettertyped.com/docs/documentation/core/adapter)
52
+ 📡 **Built-in adapter** - [Read more](https://hyperfetch.bettertyped.com/docs/core/adapter)
53
53
 
54
- 🧪 **Easy to test** - [Read more](https://hyperfetch.bettertyped.com/docs/documentation/getting-started/testing)
54
+ 🧪 **Easy to test** - [Read more](https://hyperfetch.bettertyped.com/docs/getting-started/testing)
55
55
 
56
56
  🎟 **Authentication** - [Read more](https://hyperfetch.bettertyped.com/docs/guides/basic/authentication)
57
57
 
@@ -63,7 +63,7 @@ fetch or mutate data, observe sent requests and interact with data in the cache.
63
63
 
64
64
  ## Sources
65
65
 
66
- - #### [Installation](https://hyperfetch.bettertyped.com/docs/documentation/getting-started/installation)
66
+ - #### [Installation](https://hyperfetch.bettertyped.com/docs/getting-started/installation)
67
67
  - #### [Docs](https://hyperfetch.bettertyped.com/docs/react/overview)
68
68
  - #### [API](https://hyperfetch.bettertyped.com/api/)
69
69
  - #### [NPM](https://www.npmjs.com/package/@hyper-fetch/react)