ReactJS: storybook configuration
Library with name storybook
lets you handy organize pretty functional showroom for all implemented components in your system.
Apart of ability render component, you can interact with added components: different events, variations, custom params… and manipulate them right through interface!
Create-React-App: solving import help with aliases (or Craco)
It is very important to have consistent import statements in your react projects, and to preserve relative paths hell, ex. ../../../utils/smth.ts
looks much more ugly than ~/utils/smth.ts
.
Unfortunately, latest versions of typescript support this trick worse and worse (I don’t know why, in fact).
Migrating from @material-ui to @mui
Nowadays well-known @material-ui is a legacy package, and all it’s components were migrated to new @mui package. Previous is no longer maintainable, and new components appear only in @mui. So, it’s reasonable question for everyone: How to migrate to the new package?
Create React App for multiple entry points
Sometimes it happens that you React-project contains not only one true single-page application. Especially, if you create solution for already developed website with different frontend technologies been used on it before.