Recently I got the opportunity to use DatePicker of antd library https://ant.design/components/date-picker/ for a react.js project. It was really cool to use that until I found it was using the whole antd library to import this single component. It wasn’t right and there was a solution introduced by the team. I just blogged it for anyone who will find it interesting. Read more “How to load antd components without loading the whole library”
There are some instances where you need to avoid multiple taps on a button so that it will not generate the same action chain immediately with a consecutive click. An example would be an application with a touchscreen. If you click a button rapidly, that event would be generated more than once. As a solution, most of the time devs would block the UI until the action chain is completed. But this would be a bad experience if the user is blocked for any other interactions. A typical example can be a fetch call to update the state and if the invocation is asynchronous it could be causing more inconvenience.
Recently I happened to create a middle panel where different types of components could be rendered on top it. So the idea is, the panel should be a <div> wrapper around the middle content. For this kind of situation, higher order functions with components could come in handy to use. Read more “Higher order component wrappers using React.js and reusable components.”
This guide will simply cover to embed SASS support in React.js project.
First, install node-sass and sass-loader npm packages.
Yarn: yarn add sass-loader --dev yarn add node-sass NPM: npm install node-sass npm install sass-loader --save-dev