From 944ddcf2d680c57b19ff9cc404291191ee0cd958 Mon Sep 17 00:00:00 2001 From: Mathias Date: Wed, 3 Mar 2021 20:58:56 +0100 Subject: [PATCH] update example for map/key --- react-examples.md | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/react-examples.md b/react-examples.md index 3aa7a5d..9751097 100644 --- a/react-examples.md +++ b/react-examples.md @@ -112,24 +112,22 @@ export default UserEventComponent; ## Map + Keys ```javascript - import React from 'react'; - - const ComponentWithList = (items) => { - return ( -

Awesome people list

- - ); - } - - export default ComponentWithList; +import React from "react"; + +const ComponentWithList = ({ items }) => { + return ( + <> +

Awesome people list

+ + + ); +}; + +export default ComponentWithList; ``` ```javascript