Posts

Showing posts from April, 2022

Top VS Code Extension for React Developers

Image
VS Code, one of the best IDE tools available for developers. Extensions within VS Code marketplace to enhance and speed up your productivity.  They are full of shortcuts, themes, icons, intellisense and much more.  Below is list of most useful extensions in VS Code. GitLens - Git supercharged Git Graph EditorConfig for VS Code Color Highlight Sort lines VS Code React Refactor Markdown All in One ESLint Todo Tree SVG Prettier Material Icon Theme Microsoft Live Share If you know of any other useful VS code extensions, please share them in comments. Until we meet again. Cheer!

Building professional and quality React component using Storybook

Image
StoryBook Steps to Install Storybook: Open your project. Run below command npx sb init Yarn package manager is default package manager used to add storybook in case both npm and yarn are installed. If you need to run npm then use below command: npx sb init --use-npm Using WebPack5: npx sb init --builder webpack5 Run story book using below command: npm run storybook Common Issues In some cases while running storybook, core-js creates issue due to conflicting version with babel. To resolve this add core-js@3 as dev dependency to your package. This should resolve such issues, in case it still gives issue check for conflicting version of babel or core-js. Running npm update helped in my case. In case some modules are not accessible by storybook, it could be due to webpack alias missing in storybook webpack, in that case updating modules in ./storybook/main.js can help. Using alias with webpack, need to registered with storybook webpack also to resolve dependencies during storybo...