@faasjs/react 2.8.0 → 2.8.1
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 +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -61,13 +61,13 @@ const client = FaasReactClient({
|
|
|
61
61
|
|
|
62
62
|
## Functions
|
|
63
63
|
|
|
64
|
-
- [FaasDataWrapper](functions/FaasDataWrapper.md)
|
|
65
|
-
- [FaasReactClient](functions/FaasReactClient.md)
|
|
66
|
-
- [OptionalWrapper](functions/OptionalWrapper.md)
|
|
67
64
|
- [createSplitedContext](functions/createSplitedContext.md)
|
|
68
65
|
- [createSplittingContext](functions/createSplittingContext.md)
|
|
69
66
|
- [faas](functions/faas.md)
|
|
67
|
+
- [FaasDataWrapper](functions/FaasDataWrapper.md)
|
|
68
|
+
- [FaasReactClient](functions/FaasReactClient.md)
|
|
70
69
|
- [getClient](functions/getClient.md)
|
|
70
|
+
- [OptionalWrapper](functions/OptionalWrapper.md)
|
|
71
71
|
- [useConstant](functions/useConstant.md)
|
|
72
72
|
- [useFaas](functions/useFaas.md)
|
|
73
73
|
- [withFaasData](functions/withFaasData.md)
|
package/dist/index.d.mts
CHANGED
|
@@ -3,7 +3,7 @@ export { FaasAction, FaasData, FaasParams } from '@faasjs/types';
|
|
|
3
3
|
import { Options, ResponseError, Response as Response$1 } from '@faasjs/browser';
|
|
4
4
|
export { Options, Response, ResponseError, ResponseHeaders } from '@faasjs/browser';
|
|
5
5
|
import * as react from 'react';
|
|
6
|
-
import { ReactNode, ReactElement, Component,
|
|
6
|
+
import { ReactNode, ReactElement, Component, ComponentType, ComponentProps } from 'react';
|
|
7
7
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -230,10 +230,10 @@ declare namespace FaasDataWrapper {
|
|
|
230
230
|
*
|
|
231
231
|
* @example
|
|
232
232
|
* ```tsx
|
|
233
|
-
* const MyComponent = withFaasData(
|
|
233
|
+
* const MyComponent = withFaasData(({ data }) => <div>{data.name}</div>, { action: 'test', params: { a: 1 } })
|
|
234
234
|
* ```
|
|
235
235
|
*/
|
|
236
|
-
declare function withFaasData<
|
|
236
|
+
declare function withFaasData<PathOrData extends FaasAction, TComponentProps extends FaasDataInjection<PathOrData> = FaasDataInjection<PathOrData>>(Component: React.FC<TComponentProps & Record<string, any>>, faasProps: FaasDataWrapperProps<PathOrData>): React.FC<Omit<TComponentProps, keyof FaasDataInjection> & Record<string, any>>;
|
|
237
237
|
|
|
238
238
|
type OptionalWrapperProps<TWrapper extends ComponentType<{
|
|
239
239
|
children: ReactNode;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { FaasAction, FaasData, FaasParams } from '@faasjs/types';
|
|
|
3
3
|
import { Options, ResponseError, Response as Response$1 } from '@faasjs/browser';
|
|
4
4
|
export { Options, Response, ResponseError, ResponseHeaders } from '@faasjs/browser';
|
|
5
5
|
import * as react from 'react';
|
|
6
|
-
import { ReactNode, ReactElement, Component,
|
|
6
|
+
import { ReactNode, ReactElement, Component, ComponentType, ComponentProps } from 'react';
|
|
7
7
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -230,10 +230,10 @@ declare namespace FaasDataWrapper {
|
|
|
230
230
|
*
|
|
231
231
|
* @example
|
|
232
232
|
* ```tsx
|
|
233
|
-
* const MyComponent = withFaasData(
|
|
233
|
+
* const MyComponent = withFaasData(({ data }) => <div>{data.name}</div>, { action: 'test', params: { a: 1 } })
|
|
234
234
|
* ```
|
|
235
235
|
*/
|
|
236
|
-
declare function withFaasData<
|
|
236
|
+
declare function withFaasData<PathOrData extends FaasAction, TComponentProps extends FaasDataInjection<PathOrData> = FaasDataInjection<PathOrData>>(Component: React.FC<TComponentProps & Record<string, any>>, faasProps: FaasDataWrapperProps<PathOrData>): React.FC<Omit<TComponentProps, keyof FaasDataInjection> & Record<string, any>>;
|
|
237
237
|
|
|
238
238
|
type OptionalWrapperProps<TWrapper extends ComponentType<{
|
|
239
239
|
children: ReactNode;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faasjs/react",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"dist"
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@faasjs/browser": "2.8.
|
|
37
|
+
"@faasjs/browser": "2.8.1"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"react": "*"
|