Looks like music without lyrics is the top one which makes a lot of sense. I feel like that's a little bit less distracting than some other types of music.
Awesome. Yeah, but I actually listen to the same song over and over.
That's awesome. So, let's do the Q&A. So, we got some amazing questions from our discord. And so, let's see what people were asking. So, the first question is, since SVG is valid JSX inside React components, is there any benefit to keep the SVG that I get from designers in separate files? And this is from Aprilion.
So, can you do the question again? Yeah. So, since SVG is valid JSX inside React components, is there any benefit to keep the SVG that I get from designers in separate files? No. I think it's better if you use the SVG in line. But I think it also depends what you want to do. If you're going to animate the SVG, if you're going to change properties, colors, and all of this is better if you transform the SVG into React components. If you're not going to change colors or anything, you can just import it as an image because you don't have any benefit of putting in line. So, why would you transform? Yeah, one of the benefits with BEO, you won't have an HTTP request, but I think it depends on your case. If it's just an image that you don't change anything, just import as an image. If you're going to animate it or you want to change colors based on React props, I think it's better to transform into a component.
Awesome. The next question is from Vladislav. It's always fun to read people's usernames because it's like how do you pronounce this? So is it better to use SVG always as a React component? That's it. It depends. I like to use as a React component, but because normally when I think I'm going to use an SVG is because I want to change properties, change the feel, animate, and also have the best quality because it's like a vector image. So, I think if your use case is you're going to have interactions, you want to let's say you have an icon, and the icon is an SVG, and maybe you want to make the icon really customizable because in one part of the page you want to use that icon in dark color, but maybe in other page you want to use that icon with a different color. So, you just need to pass a prop with the color. If you are importing an image, the SVG as an image you would have to export in red and import, and then you would have to export again with another color, import as an image, and do this over and over again. So, if you want to make use of the customization, I think it's better to transform into React component.
Cool. Awesome. Two questions from Habma.
Comments