Skip to content

Instantly share code, notes, and snippets.

@francoisgeorgy
Last active April 13, 2020 16:18
Show Gist options
  • Select an option

  • Save francoisgeorgy/f00033747ec622185f0fc9f29f9fa039 to your computer and use it in GitHub Desktop.

Select an option

Save francoisgeorgy/f00033747ec622185f0fc9f29f9fa039 to your computer and use it in GitHub Desktop.
loop in #react #jsx
export const ExampleSizes = () => {
return [...Array(10)].map((i,j)=>
<div style={{width:`${j*50}px`}}>
...
</div>
);
};
/*
{[...Array(10)].map((i,j)=>
<div style={{width:`${j*50}px`}}>
...
</div>
)}
*/
/*
<tbody>
{Array(10).fill(1).map((el, i) =>
<ObjectRow key={i} />
)}
</tbody>
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment