Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Javascript inside html

Public visualization

Javascript inside html

0 stars1🌍 Public
CCurran Kelleher
Last edited Feb 21, 2020
Created on Feb 21, 2020

This example demonstrates how JavaScript expressions can be embedded directly within JSX markup in a React application, rendering both text calculations and SVG circles. The code uses React 16.10.0 with ReactDOM to mount a component that computes squares of array values and maps them to `<circle>` elements with magenta and green fills. It also maps string elements to list items in a separate `Test` component. The visualization shows a simple SVG scene with positioned circles on a 960×500 canvas, highlighting the interplay between inline JavaScript logic and declarative React rendering.

AI-generated description

React Starter code.

Comments

Sign in to join the discussion.

MIT Licensed