Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

if statement

Public visualization

if statement

0 stars1🌍 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.

Comments

Sign in to join the discussion.

MIT Licensed