A micro frontend is a development approach that breaks down a web application’s front end into smaller, self-contained modules. These modules can be developed, tested, and deployed independently, making micro frontends particularly useful for large and complex web applications that demand flexibility and faster iterations. Create To implement a micro frontend architecture, start by dividing…
Month: January 2024
React Best Practice: Part 2
Function Recreation: Utilizing the useCallback hook is crucial as it allows you to memorize a function. Whenever a component is re-rendered, all functions within the component are unnecessarily recreated, adversely impacting app performance. To mitigate this, a simple solution is to enclose the function with the useCallback hook, preventing recreation when no dependencies have changed….
React Best Practices: Part 1
Custom Hooks: Custom hooks are a powerful mechanism in React to encapsulate and reuse logic. By creating separate functions as custom hooks, you can modularize your code, making it more readable and maintainable. These hooks can encapsulate complex logic or API calls, promoting code organization and reusability. Example: https://github.com/thatsrohitnaik/my-react-boiler-code/blob/main/src/hook/useApp.ts Cache with SWR: The SWR (Stale…