Working with SVG in React and different ways of styling it

  Рет қаралды 57,893

The Devlpr

The Devlpr

Күн бұрын

Пікірлер: 31
@himanshulal97
@himanshulal97 3 жыл бұрын
whoo tha exactly what i want to do with my svgs thanks a lot broo god bless you. hare krishana !
@thedevlpr684
@thedevlpr684 3 жыл бұрын
You're welcome bro
@Mufees_mhd
@Mufees_mhd 2 ай бұрын
i have 4 logos like these so i did this last method now i need to call this 4 times with in a card. so it's make some kind a code repeat and ugly. i wonder am i able to call these components like array maping?
@jotasenator
@jotasenator 3 жыл бұрын
great! I had a todo ..and it s about to change values inside SVG that I have rendered in my site..like variable's values that I obtain from other components ...what do you think about it?
@afrikanking4022
@afrikanking4022 4 ай бұрын
I have a problem which I want to solve with svg. want a map of a country with all states and provinces. but I need these states to have either one of 3 states. One grey, light blue and dark blue based on voter numbers. I also want them to be clickable so that they can open another component
@tootyrnt5533
@tootyrnt5533 3 жыл бұрын
Is there any way I can create a reusable component to handle multiple SVGs? I have like 6 logos and it'd be a lot easier if i can use one component and just pass down the props.
@thedevlpr684
@thedevlpr684 3 жыл бұрын
That's doable for sure you just wrote the steps to create it 😅
@rubenverster250
@rubenverster250 2 жыл бұрын
You'll have to basically create a higher order component that manages svgs XP
@raba650
@raba650 3 жыл бұрын
This is great, but what about packaged svg icons like react-icons where you don’t have access to the individual svg file for its React component?
@thedevlpr684
@thedevlpr684 3 жыл бұрын
Not sure as I haven't worked with react icons but id say they probably accept props to change the SVG look and feel
@awabelmahe9700
@awabelmahe9700 2 жыл бұрын
Thank you for the very helpful video. I didn't occur to me to convert the svg to a react component.
@thedevlpr684
@thedevlpr684 2 жыл бұрын
You are welcome
@zen123w
@zen123w Жыл бұрын
Great video and explanation!
@manshihudda763
@manshihudda763 2 жыл бұрын
Hi , how to use JSON of 100 svg logo and edit in react, because i want to render 100 svg logo in my project and want to edit icon and text of svg logo
@prathmeshkalehere
@prathmeshkalehere 2 жыл бұрын
where did that came from?????
@JosephSackey597
@JosephSackey597 6 ай бұрын
It is self generated when you create an svg file.
@dylannoel1996
@dylannoel1996 Ай бұрын
g is like a div but for SVG
@ofir77
@ofir77 3 жыл бұрын
Great video thanks!!
@thedevlpr684
@thedevlpr684 3 жыл бұрын
You're welcome 😉
@shaileshrkumar6813
@shaileshrkumar6813 3 жыл бұрын
how to add svg in background ? is it possible
@himanshulal97
@himanshulal97 3 жыл бұрын
yes bro it is possible simply add background: url(relative path of that svg)
@rubenverster250
@rubenverster250 2 жыл бұрын
background-image: url(REL_SVG_PATH); background-repeat: no-repeat;
@arturhonores9141
@arturhonores9141 Жыл бұрын
muchas gracias por el video, me ha sido muy útil.
@lautarocorva6994
@lautarocorva6994 Жыл бұрын
Good explanation bro
@TheTonyMan
@TheTonyMan 2 жыл бұрын
thanks
@JustAleks42
@JustAleks42 2 жыл бұрын
thanks)
@danieloyeleye3257
@danieloyeleye3257 Жыл бұрын
My svg is not rendering anything, it's fucking BLANK, I imported it just like u did, had the same className and React could definitely find the damn file
@youtubegarbage4u
@youtubegarbage4u 3 жыл бұрын
imagine you have like 50 svg images...so you have components for each of all 50 images???
@thedevlpr684
@thedevlpr684 3 жыл бұрын
No you can pass the image SVG as a child maybe..play around with it ;)
@rubenverster250
@rubenverster250 2 жыл бұрын
HOC
@asnaos5187
@asnaos5187 2 жыл бұрын
You can use SVGR, because it allow import svg how ReactComponent and you can use svg as a component, like the one shown in the video
Junior vs Senior React Folder Structure - How To Organize React Projects
16:16
A beginners guide to SVG | Part One: The Why, What, and How
14:22
Kevin Powell
Рет қаралды 362 М.
小蚂蚁会选到什么呢!#火影忍者 #佐助 #家庭
00:47
火影忍者一家
Рет қаралды 116 МЛН
小路飞嫁祸姐姐搞破坏 #路飞#海贼王
00:45
路飞与唐舞桐
Рет қаралды 29 МЛН
The Right Way to Animate SVG in React
15:36
CoderOne
Рет қаралды 24 М.
Stop Doing this as a React Developer
12:27
CoderOne
Рет қаралды 164 М.
How To Debug React Apps Like A Senior Developer
21:07
Web Dev Simplified
Рет қаралды 152 М.
You might not need useEffect() ...
21:45
Academind
Рет қаралды 164 М.
SVG Viewport and viewBox (For Complete Beginners)
12:25
Envato Tuts+
Рет қаралды 28 М.
Every React Concept Explained in 12 Minutes
11:53
Code Bootcamp
Рет қаралды 719 М.
EASY React Animation with useGSAP()
12:45
GSAP Learning
Рет қаралды 99 М.
Finally Figure out the SVG ViewBox - Tutorial + ViewBox Tools
11:07
Learn React Hooks: useCallback - Simply Explained!
17:15
Cosden Solutions
Рет қаралды 98 М.
Add Custom SVG Icons in NextJS - Tutorial
9:01
Josh tried coding
Рет қаралды 31 М.
小蚂蚁会选到什么呢!#火影忍者 #佐助 #家庭
00:47
火影忍者一家
Рет қаралды 116 МЛН