@dzmtoast
Nothing here yet.
Nothing here yet.
No blogs yet.
React is not two-way-bind for your local variable arr , so no matter how much time your arr changed, React will just ignore, it only care about state. The concept in render() function is simple: what you can see in your page, depends on what you have return from render() function, so if you want to see the changing process of your arr, you should set a state for that variable, and every time your state change(for example use setState() function), the render() function would called, and your page would be rerendered then, so you can see the change. Plus, try not set side-effect function(in your case is window.onload=... and setInterval) inside render() function, do that stuff in lifecycle function, checkout the doc: https://reactjs.org/docs/react-component.html