title: Is there any way to change state inside render in React js?
body: <p>So I am working on a dice application where I have a class component for setting the number of dice and sides of each dice with up and down buttons. My problem is that each time I press up or down button to set number of sides or number of dice, an array of random numbers gets created and displays on screen. However, I want the value to display only when the roll button is clicked.</p>
  
  <p>So is there a way I can change the state of displayDice to false after I have created the array in the render, so that it only becomes true when I click roll button again</p>