Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mapping components

Public visualization

Mapping components

0 stars0🌍 Public
JJunyanL
Last edited Feb 16, 2020
Created on Feb 16, 2020
Forked from Props in react

This example shows how to render a list of jokes from an array of objects using React components. The `App` component maps over the imported `JokeSource` array and passes each item’s `question` and `punchline` as props to the `Joke` component, which conditionally displays the question and adjusts the punchline font size based on whether a question exists. The code uses React’s `map()` method to generate multiple DOM elements dynamically from the static data file.

AI-generated description

In this exercise, I will take an array of raw data and convert them into a number of components.

Use imported array of objects to make a list of jokes

Comments

Sign in to join the discussion.

MIT Licensed