@alevnyacow/nzmt 0.15.14 → 0.15.16

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 (2) hide show
  1. package/README.md +3 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -215,7 +215,9 @@ Command `crud-service` is a lot like the `crud-api` command, but it stops after
215
215
  - tweak the Product store schemas if needed (`/server/stores/product/product.store.ts`)
216
216
  - write Prisma store mappers (`/server/stores/product/product.store.prisma.ts`) as in previous example.
217
217
 
218
- `Services` can be used in Server Actions. So, when you make `crud-api`, this generated service can also be used in Server Actions. Using it is very simple, you need `fromDI` function, which was scaffolded when you initialized NMZT. Let's take a look at combined example with two services we've just created:
218
+ `Services` can be used in Server Actions. Well, basically `Stores` can be used too as they are injected the same way as services, but it's strongly recommended to use services. Also, when you make `crud-api`, this generated service can also be used in Server Actions.
219
+
220
+ Using services in Server Actions is very simple. You only need an instance of the service and then you can call required methods. To get an instance, use `fromDI` function, which was scaffolded when you initialized NMZT. Let's take a look at combined example with two services we've just created:
219
221
 
220
222
  ```tsx
221
223
  'use server'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alevnyacow/nzmt",
3
- "version": "0.15.14",
3
+ "version": "0.15.16",
4
4
  "description": "Next Zod Modules Toolkit",
5
5
  "repository": {
6
6
  "type": "git",