How to Draw Shapes in React

An Introduction to React Konva

Image for post
Image for post
export const rightTriangle = () => {
return(
null
);
};
export const rightTriangle = () => {
return(
<Stage width={100} height={100}>
</Stage>
);
};
export const rightTriangle = () => {
return(
<Stage width={100} height={100}>
<Layer>
</Layer>
</Stage>
);
};
export const rightTriangle = () => {
return(
<Stage width={100} height={100}>
<Layer>
<Line closed points={[0, 100, 100, 100, 0, 0]} fill="red" />
</Layer>
</Stage>
);
};
Image for post
Image for post
Image for post
Image for post

Software developer and science/tech writer. Python, Ruby on Rails, JavaScript, React/Redux, Java. Fascinated by the amazing stories behind today’s tech.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store