ReactJS project on SVG drawing using functional components-
Here is a really short piece of ReactJS code to draw SVGs:
import React from 'react';
function Parabola() {
return <path d="M 100 350 q 150 -300 300 0" stroke="blue"
stroke-width="5" fill="none" />;
}
function Line()
{
return <path d='M 175 200 l 150 0' stroke='green' stroke-width='3'
fill='none' />;
}
class SVG extends React.Component
{
render()
{
return(
<svg width="400" height="450">
<Line/>
<Parabola/> </svg>
);
}
}
export default SVG;
Which draws the following output on the screen:
I have the project link here:
https://github.com/bmkamath2000/React-Projs/tree/master/path-svg
Full stack Training in Delhi
ReplyDeleteFull Stack Classes in Delhi
Thanks a bunch for sharing this with all of us you actually know what you are talking about! Bookmarked. Please also visit my site.
ReplyDeleteSQL Training In Hyderabad
best SQL training institute in hyderabad
SQL training in ameerpet
SQL server Training in Hyderabad
sql Training
sql Online Training
sql server Online Training in Hyderabad
sql Online Training institute
sql server Training institute in Ameerpet
sql server Course in Hyderabad