You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
react-ketting.js?v=61b31b9f:379 Uncaught TypeError: Cannot read properties of undefined (reading 'data')
at useNewResource (react-ketting.js?v=61b31b9f:379:47)
from function useNewResource line 114 data: useResourceResult.resourceState.data,
It seems resourceState is undefined.
I am using const {loading, error, resourceState, setResourceState, submit, data, setData, resource} = useNewResource("/api/eprs", { initialData: {}, refreshOnStale: true});
and calling submit(); seems to work OK. It creates POST request that returns 201 and then it creates GET request that returns 200 and data response but then the react page throws error from within react-ketting.
There are no documentation or example how to use the useNewResources hook. Is there something that needs to be doen the the promise returned by submit() ?
Also initialing the useNewResource hook, the loading is always true.
The text was updated successfully, but these errors were encountered:
With react-ketting: 4.0.10 I am getting error :
from function useNewResource line 114
data: useResourceResult.resourceState.data,
It seems
resourceState
is undefined.I am using
const {loading, error, resourceState, setResourceState, submit, data, setData, resource} = useNewResource("/api/eprs", { initialData: {}, refreshOnStale: true});
and calling
submit();
seems to work OK. It creates POST request that returns 201 and then it creates GET request that returns 200 and data response but then the react page throws error from within react-ketting.There are no documentation or example how to use the useNewResources hook. Is there something that needs to be doen the the promise returned by submit() ?
Also initialing the useNewResource hook, the
loading
is always true.The text was updated successfully, but these errors were encountered: