Responsive background with CSS and ReactHow to create reusable React component to set responsive background image on DOM element.Feb 18Feb 18
Mocking fs and glob modules with Jestto test scripts that read and write files to disk.Dec 6, 2023Dec 6, 2023
NextJS and React hydration problem on productionTL;DR: The problem was Cloudflare’s minification service.May 18, 2023May 18, 2023
Mocking local storage with JestHow should we test the component that is using local storage?Oct 15, 20221Oct 15, 20221
Mocking setTimeout with JestThe title of this post may be a little misleading as we won’t write any mocks but we need to use some functionality that Jest provides…Aug 6, 20222Aug 6, 20222
Jest mock and spy — mockClear vs mockReset vs mockRestoreWhen writing unit tests we need to make sure that every test is independent of others. When using shared mocks/spies we need to remember…Feb 20, 20223Feb 20, 20223
React and dual/multi color SVG iconLately I was implementing new UI in the project based on Figma design. The design had dual color icons for ticks and errors.Jan 7, 2022Jan 7, 2022