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?
ReactJS – how to interract with component from outer js
Due my current work task i have a case – to call a modal created as a React-component from SharePoint Ribbon. In two words, SharePoint ribbon is a structure that contains buttons and js-functions binded for it. When you push the button, js function binded for it calls… hope you understand :). And i started to google: “how to interract with react module from outer js, how to change react state from outer js, force re-render react component from pure js” and so on…
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.