title: ReactJS map an array random
body: <p>I've been trying to map an array in a random way. I want every object of the array to show up. But the order should always be different and random on refresh.</p>
  <pre><code>const [ list ] = [
          {id: 0, img: &quot;img&quot;, key: 0, class: &quot;wrap&quot;, classFlip: &quot;wrap card-flip&quot;, match: false},
          {id: 1, img: &quot;img&quot;, key: 0, class: &quot;wrap&quot;, classFlip: &quot;wrap card-flip&quot;, match: false},
          {id: 2, img: &quot;img&quot;, key: 2, class: &quot;wrap&quot;, classFlip: &quot;wrap card-flip&quot;, match: false},
          {id: 3, img: &quot;img&quot;, key: 2, class: &quot;wrap&quot;, classFlip: &quot;wrap card-flip&quot;, match: false},
          {id: 4, img: &quot;img&quot;, key: 3, class: &quot;wrap&quot;, classFlip: &quot;wrap card-flip&quot;, match: false},
          {id: 5, img: &quot;img&quot;, key: 3, class: &quot;wrap&quot;, classFlip: &quot;wrap card-flip&quot;, match: false},
          {id: 6, img: &quot;img&quot;, key: 4, class: &quot;wrap&quot;, classFlip: &quot;wrap card-flip&quot;, match: false},
          {id: 7, img: &quot;img&quot;, key: 4, class: &quot;wrap&quot;, classFlip: &quot;wrap card-flip&quot;, match: false},
          {id: 8, img: &quot;img&quot;, key: 5, class: &quot;wrap&quot;, classFlip: &quot;wrap card-flip&quot;, match: false},
          {id: 9, img: &quot;img&quot;, key: 5, class: &quot;wrap&quot;, classFlip: &quot;wrap card-flip&quot;, match: false}
      ];
  
   {list.map((item) =&gt; (...
  
  
  </code></pre>