4 posts tagged with "react"
How to setup LESS with React without Ejecting
Posted on January, 2021SASS has been natively supported since React 16.7 with a single additional package node-sass. It can be easily integrated simply by adding node-sass and importing your pre-processed stylesheet. However, there is not such an easy solution to handle compiling LESS stylesheets. This is problematic because to manually configure webpack to compile our LESS…
Read full postCreating Reusable Components with useMemo
Posted on January, 2021Today we will looking at a principle of creating resilient components in React and creating a useful custom hook with the useMemo hook. Sometimes when creating a component, we can assume that it will only be used once. However, that assumption may lead into problems sharing props when reusing a simple component. In our example here today, we will look at…
Read full postHandling multi-page API calls with React Hooks
Posted on December, 2020Today we will be walking through an example of how to make continuous API calls to fetch multiple pages of data. Our goal is to build a small web app using React and the HooksAPI that will load dynamically based on user parameters. We will be fetching data from the free API CheapShark API, which provides data for sales across multiple game vendors…
Read full postHow to do Dark Mode with React Hooks
Posted on December, 2020Dark Mode is one of the latest features being widely adopted across apps and websites. Dark colours can prolong the battery life of mobile devices. The savings, according to Google with the Dark Mode offered on the YouTube app, allows a 15 percent energy reduction at 50 percent brightness and a huge 60 percent reduction at 100 percent bightness. Apple…
Read full post