Member-only story
Pro Tips for Efficient SVG Management in React
Let’s reveal the full potential of using SVG images in the ReactJS application together.
The SVG is the most loved vector image, and it simplifies and reduces the weight of the application.
Commonly, we know that SVG is based on dots and lines that come together to draw the image. The superpowers of vector images are lightweight, customization, and flexibility.
Today, I will provide all the tips you need to know for efficient usage of the SVG.
Let’s take any SVG image, for example, the right-chevron
. That image we will copy from the Figma (link).
We will take this right-chevron.
<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M8.75 5L15.75 12L8.75 19" stroke="black" stroke-width="1.5" stroke-linecap="square"/>
</svg>
Let’s start with the weight of the image, this is important for application for the first downloading of a page.
In this example, I will use and recommend an SVG minimizer site (link).