Sep 3, 2018 · 1 min read
Hi Julia, first of all: thank you for the post :) I found myself in the same situation some days ago :)
One question: what are the cases where using this mocks are really helpful? I ask you that because:
- in storybook you can remove a wrapper adding a decorator, it’s useful I know but it’s not a game-changer
- in Jest, you wrap the component with a MockRouter component instead of BrowserRouter
So at my first glance, the advantage doesn’t justify the use of two more libraries (that must be kept updated with the new router versions etc.), what am I missing?
I’m not telling you’re wrong, I just haven’t so much experience with the React ecosystem and I can’t see the long-term advantages :)
Thank you
Best
Stefano
