Why does returning plain object from a loader in Remix work?
When using loaders in Remix, one should — according to the documentation — return a response object:
Optimistic UI in Remix
I have a form that contains input fields. Once you submit them, I want to immediately display them in the list item without waiting for the API to finish responding. If the API responds with an error, I want to hide them.
Type ‘{ closeCallback: MouseEventHandler; }’ is not assignable to type ‘IntrinsicAttributes & MouseEvent
In the component below I am showing a dialog which takes a closeCallback function as a props. Code for Basic Model basically takes in this prop and call it anytime the cross button is clicked. But then instead of actually disappearing I am noticing an error in my console logs, i.e. closeCallback is not a function.
Remix React – Type ‘{ closeCallback: MouseEventHandler; }’ is not assignable to type ‘IntrinsicAttributes & MouseEvent
In the component below I am showing a dialog which takes a closeCallback function as a props. Code for Basic Model basically takes in this prop and call it anytime the cross button is clicked. But then instead of actually disappearing I am noticing an error in my console logs, i.e. closeCallback is not a function.
Get Type For Props in Remix React
I needed to pass project
to the <ProjectForm />
. I don’t it want it to be a any
type, how can I put a type there for the project
? What’s the proper type
for it?