DEV Community

Discussion on: Does front end developer need a mock API Service?

Collapse
 
patroza profile image
Patrick Roza

I like the idea, we’ve also been fighting with similar things. As alternative you can develop with local mock data in storybook and e.g exclude that from the prod build. Only when the api is fully ready, you can then finish the actual integration.

With storybook you need to mock props from your UI. With api mock you need to mock your api models. I guess in the end it comes down to which one is more stable in your project. But Storybook comes with a lot of other benefits too.

Collapse
 
znick1982 profile image
Nikolay • Edited

Hi Patrick.
Thanks for the proof that I am not only one with my problem.
I watched at the Storybook and I like it. I believe it could be complementary tools. For example in Storybook you can test your components separately and with Mock API you could test entire application and look how components work in conjunction.