@c-rex/components 0.1.26 → 0.1.28

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c-rex/components",
3
- "version": "0.1.26",
3
+ "version": "0.1.28",
4
4
  "files": [
5
5
  "src"
6
6
  ],
@@ -14,7 +14,7 @@ export type DataRequestRenderProps<T> = {
14
14
  type DataRequestProps<T, PathParams, QueryParams> = {
15
15
  pathParams?: PathParams;
16
16
  queryParams?: QueryParams;
17
- render: (data: T, error?: SerializedError) => React.ReactNode;
17
+ render: (data: T, error?: SerializedError) => any; // any because it can return JSX, async functions, etc.
18
18
  };
19
19
 
20
20
 
@@ -25,7 +25,7 @@ export function createDataRequestWithParams<T, PathParams, QueryParams>(
25
25
  pathParams,
26
26
  queryParams = {} as QueryParams,
27
27
  render,
28
- }: DataRequestProps<T, PathParams, QueryParams>) {
28
+ }: DataRequestProps<T, PathParams, QueryParams>): Promise<any> {
29
29
  let endpoint = endpointTemplate;
30
30
  if (pathParams) {
31
31
  endpoint = Object.entries(pathParams as Record<string, string>).reduce(