Is there currently a way to say pass a onObjectClicked: () => void callback function to the cell without modifying the QUERY or the beforeQuery hooks which also keeps TypeScript from complaining about unknown intrinsic props?? i.e.
Yeah that is basically what we ended up doing, just wondered if there was a nicer way or something in the roadmap to not have to ignore the eslint and typescript warnings
I think this issue is very relevant. It really limits the usage of the cells to not be able to do that. I am also surprise because the doc says:
Cells also make sure to funnel the right props to the right component. Loading , Empty , Failure , > and Success all have access to the props passed down from the Cell in good ol’ React fashion
Yeah, it’s important to realize that all code/types that RW generates is best-effort code that works in the most common scenarios. As you start doing more advanced things you’ll probably start having to modify and extend the generated code.
In this specific example the correct thing to do is to extend the type. You can do it inline like @callingmedic911 showed in the linked PR
Yes, thanks for the clarification. Do you know if there is any good reason for having the result of the query merged with the props? Looks to me like the props should be inside a second argument to these cells’ callbacks