Restore old createRemixStub
API to facilitate passing props to the components we want to test
#7945
janhesters
started this conversation in
Proposals
Replies: 1 comment 3 replies
-
The use case for createRemixStub is not to test Kent's full stack components, but to test route components, and route components doesn't receive props in Remix because you don't render them. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The new
createRemixStub
API looks something like this:The old one looked like this:
The main problem is, that this new API makes it hard to pass props to the component we're testing.
With the old API, you could just put it in the JSX.
With the new API, you'll have to do something like this:
Since one of the main uses cases of
createRemixStub
is to test full stack components, which might take in props, and that old API made that more convenient, it would be dope to revert the API change 🙏Beta Was this translation helpful? Give feedback.
All reactions