Skip to main content
100%

if statement

✓ Published1🌍 Public
NNita
Last edited Mar 27, 2020
Created on Mar 26, 2020
Forked from if statement

This example demonstrates a conditional SVG rendering inside a React component. A circle is drawn at the center of a 960×500 viewport; because the constant R is set to 400, the ternary operator in JSX chooses the red circle with radius 150 instead of the green one with radius 400. The code uses React’s `ReactDOM.render` and JSX to produce the SVG output, with inline styling and a production build of React 16.10.0.

AI-generated description

React Starter code.

MIT Licensed

Similar vizzes