Skip to content

Instantly share code, notes, and snippets.

@wijiler
Created February 21, 2021 13:51
Show Gist options
  • Select an option

  • Save wijiler/febc3f6aae1ceb72f33b95d5b3de6c98 to your computer and use it in GitHub Desktop.

Select an option

Save wijiler/febc3f6aae1ceb72f33b95d5b3de6c98 to your computer and use it in GitHub Desktop.
Map
<>
{tasks.map((tasks) => (<h3>{tasks.text}</h3>
))}
</>
@Ratstail91
Copy link

Ratstail91 commented Feb 21, 2021

const tasks = [
	{
		"text": "Doctors Appointment",
		"day": "Feb 5th at 2:30pm",
		"reminder": true
	},
	{
		"text": "Meeting at School",
		"day": "Feb 6th at 1:30pm",
		"reminder": true
	}
];

const Tasks = () => {
	return (
		<div>
			{ tasks.map(t => <h3>{t.text}</h3> )}
		</div>
	);
};

export default Tasks;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment