-
storybook
Storybook is a frontend workshop for building UI components and pages in isolation. Made for UI development, testing, and documentation.
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
-
react-query
Discontinued 🤖 Powerful asynchronous state management, server-state utilities and data fetching for TS/JS, React, Solid, Svelte and Vue. [Moved to: https://github.com/TanStack/query]
Now, in a Node environment, we can use node-fetch in conjunction with our ping function, like so:
Testing is not the only such environment. Platforms like Storybook streamline documentation and can do without using many of our hooks and business logic.
React Query is a prime example of this. We can use the same provider in both development and testing and feed it to different clients within each environment.
Depending on the context, dependency injection might not be the right tool for the job. Data-fetching hooks, for instance, are better mocked using an interceptor (like MSW) instead of injecting hooks all over your test code, and outright mocking functions remains an advanced and cumbersome tool for bigger problems.
Related posts
-
Leveraging the `key` prop to re-render Storybook stories
-
Testing Next.js pages
-
React beginner: I have made a basic weather app in React that works, but upon fetching new data, I get a CORS policy error. I did some researching online but none of those suggestions have fixed the issue. Can you please let me know how to modify my fetch request to fix this? CodePen included
-
Integrating reCAPTCHA with Next.js
-
Xior.js: The Modern Axios