daily pastebin goal
15%
SHARE
TWEET

Untitled

a guest Feb 20th, 2019 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const items = props.data.values.map(value => ({
  2.   id: value.id
  3.   name: value.name,
  4.   rating: Number(value.rating)
  5. }));
  6.  
  7. return (
  8.   {items.map(item => (
  9.     <div key={item.id}....
  10.   )}
  11. );
  12.      
  13. const [items] = useState(data.values.map(value => ({
  14.   id: value.id
  15.   name: value.name,
  16.   rating: Number(value.rating)
  17. })));
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top