@dismissible/nestjs-core 2.0.3 → 3.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.
- package/README.md +8 -0
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -137,6 +137,14 @@ function WelcomeBanner() {
|
|
|
137
137
|
|
|
138
138
|
The React client automatically uses the built-in REST API endpoints, so no additional configuration is needed on the backend.
|
|
139
139
|
|
|
140
|
+
#### Automatic Request Batching
|
|
141
|
+
|
|
142
|
+
When multiple `useDismissible` hooks are rendered on the same page, the React client automatically batches them into a single API request. This optimization reduces network overhead and improves performance, especially for pages with many dismissible components.
|
|
143
|
+
|
|
144
|
+
For example, if your page renders components using `useDismissible('welcome-banner')`, `useDismissible('onboarding-tip')`, and `useDismissible('feature-announcement')`, the client will automatically combine these into a single batch request to the `POST /v1/users/:userId/items` endpoint instead of making three separate API calls.
|
|
145
|
+
|
|
146
|
+
The batch endpoint supports up to **50 items per request**. If more than 50 items are requested, the client will split them into multiple batch requests automatically.
|
|
147
|
+
|
|
140
148
|
## Configuration Options
|
|
141
149
|
|
|
142
150
|
All configuration is done through `DismissibleModule.forRoot()`. The following options are available:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dismissible/nestjs-core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Core Dismissible state management library for NestJS applications",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"types": "./src/index.d.ts",
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@nestjs/event-emitter": "^3.0.1",
|
|
21
|
-
"@dismissible/nestjs-hooks": "^
|
|
22
|
-
"@dismissible/nestjs-item": "^
|
|
23
|
-
"@dismissible/nestjs-request": "^
|
|
24
|
-
"@dismissible/nestjs-storage": "^
|
|
25
|
-
"@dismissible/nestjs-logger": "^
|
|
26
|
-
"@dismissible/nestjs-validation": "^
|
|
21
|
+
"@dismissible/nestjs-hooks": "^3.0.0",
|
|
22
|
+
"@dismissible/nestjs-item": "^3.0.0",
|
|
23
|
+
"@dismissible/nestjs-request": "^3.0.0",
|
|
24
|
+
"@dismissible/nestjs-storage": "^3.0.0",
|
|
25
|
+
"@dismissible/nestjs-logger": "^3.0.0",
|
|
26
|
+
"@dismissible/nestjs-validation": "^3.0.0"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"@nestjs/common": "^10.0.0 || ^11.0.0",
|