importing svg into react
import React from 'react';
import { ReactComponent as BrandIcon } from "./assets/brand-icon.svg";
export default function(){
return(
<div>
<BrandIcon />
</div>
);
}
importing svg into react
import React from 'react';
import { ReactComponent as BrandIcon } from "./assets/brand-icon.svg";
export default function(){
return(
<div>
<BrandIcon />
</div>
);
}
how to use svg in react js
import React from 'react';
import LogoName from '../assets/logo.svg'
const Header = () => {
return (
<div>
<img src={LogoName} alt="logo"/>
</div>
);
}
react svg
//Use this WEB APP to convert any svg to a valide reactJs or React native Component
Playground - SVGR
https://react-svgr.com/playground/
Svg as a component react
import React from 'react';
import {ReactComponent as ReactLogo} from './logo.svg';
const App = () => {
return (
<div className="App">
<ReactLogo />
</div>
);
}
export default App;
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us