@faasjs/react 0.0.3-beta.10 → 0.0.3-beta.11

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 +11 -7
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -134,7 +134,7 @@ ___
134
134
  | Name | Type |
135
135
  | :------ | :------ |
136
136
  | `faas` | <PathOrData\>(`action`: `string` \| `PathOrData`, `params`: [`FaasParams`](#faasparams)<`PathOrData`\>) => `Promise`<[`Response`](classes/Response.md)<[`FaasData`](#faasdata)<`PathOrData`\>\>\> |
137
- | `useFaas` | <PathOrData\>(`action`: `string` \| `PathOrData`, `defaultParams`: [`FaasParams`](#faasparams)<`PathOrData`\>) => [`FaasDataInjection`](#faasdatainjection)<[`FaasData`](#faasdata)<`PathOrData`\>\> |
137
+ | `useFaas` | <PathOrData\>(`action`: `string` \| `PathOrData`, `defaultParams`: [`FaasParams`](#faasparams)<`PathOrData`\>, `options?`: { `data?`: [`FaasData`](#faasdata)<`PathOrData`\> ; `setData?`: `React.Dispatch`<`React.SetStateAction`<[`FaasData`](#faasdata)<`PathOrData`\>\>\> ; `skip?`: `boolean` }) => [`FaasDataInjection`](#faasdatainjection)<[`FaasData`](#faasdata)<`PathOrData`\>\> |
138
138
  | `FaasDataWrapper` | <PathOrData\>(`props`: [`FaasDataWrapperProps`](#faasdatawrapperprops)<`PathOrData`\>) => `Element` |
139
139
 
140
140
  ___
@@ -194,7 +194,7 @@ ___
194
194
 
195
195
  ### FaasReactClient
196
196
 
197
- ▸ **FaasReactClient**(`__namedParameters`): [`FaasReactClientInstance`](#faasreactclientinstance)
197
+ ▸ **FaasReactClient**(`«destructured»`): [`FaasReactClientInstance`](#faasreactclientinstance)
198
198
 
199
199
  Before use faas, you should initialize a FaasReactClient.
200
200
 
@@ -202,10 +202,10 @@ Before use faas, you should initialize a FaasReactClient.
202
202
 
203
203
  | Name | Type |
204
204
  | :------ | :------ |
205
- | `__namedParameters` | `Object` |
206
- | `__namedParameters.domain` | `string` |
207
- | `__namedParameters.onError?` | (`action`: `string`, `params`: `Record`<`string`, `any`\>) => (`res`: [`ResponseError`](classes/ResponseError.md)) => `Promise`<`void`\> |
208
- | `__namedParameters.options?` | [`Options`](#options) |
205
+ | `«destructured»` | `Object` |
206
+ | › `domain` | `string` |
207
+ | › `onError?` | (`action`: `string`, `params`: `Record`<`string`, `any`\>) => (`res`: [`ResponseError`](classes/ResponseError.md)) => `Promise`<`void`\> |
208
+ | › `options?` | [`Options`](#options) |
209
209
 
210
210
  #### Returns
211
211
 
@@ -276,7 +276,7 @@ ___
276
276
 
277
277
  ### useFaas
278
278
 
279
- ▸ **useFaas**<`PathOrData`\>(`action`, `defaultParams`): [`FaasDataInjection`](#faasdatainjection)<[`FaasData`](#faasdata)<`PathOrData`\>\>
279
+ ▸ **useFaas**<`PathOrData`\>(`action`, `defaultParams`, `options?`): [`FaasDataInjection`](#faasdatainjection)<[`FaasData`](#faasdata)<`PathOrData`\>\>
280
280
 
281
281
  Request faas server with React hook
282
282
 
@@ -292,6 +292,10 @@ Request faas server with React hook
292
292
  | :------ | :------ | :------ |
293
293
  | `action` | `string` \| `PathOrData` | {string} action name |
294
294
  | `defaultParams` | [`FaasParams`](#faasparams)<`PathOrData`\> | {object} initial action params |
295
+ | `options?` | `Object` | - |
296
+ | `options.data?` | [`FaasData`](#faasdata)<`PathOrData`\> | - |
297
+ | `options.setData?` | `Dispatch`<`SetStateAction`<[`FaasData`](#faasdata)<`PathOrData`\>\>\> | - |
298
+ | `options.skip?` | `boolean` | - |
295
299
 
296
300
  #### Returns
297
301
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faasjs/react",
3
- "version": "0.0.3-beta.10",
3
+ "version": "0.0.3-beta.11",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -23,8 +23,8 @@
23
23
  "dist"
24
24
  ],
25
25
  "dependencies": {
26
- "@faasjs/browser": "^0.0.3-beta.10",
27
- "@faasjs/types": "^0.0.3-beta.10",
26
+ "@faasjs/browser": "^0.0.3-beta.11",
27
+ "@faasjs/types": "^0.0.3-beta.11",
28
28
  "react": "*"
29
29
  },
30
30
  "devDependencies": {