I have a list with items that first load 30 items, and if the user clicks "Download All", the rest of the items are displayed:
+---------------------------------------------------------+ | | | List | | | | | | | +---------------------------------------------------------+ | Load All Button | +---------------------------------------------------------+
When the list is large (more than 1K items), the rendering of the “Download All” phase takes some time, while the DOM is stuck and does not respond.
What is the right way to trigger React's life cycle events so that when you click a button it changes to the bootloader and when the list is fully displayed and ready it will change?
I tried to separate the two parts (list and button) into two components and wrap them in the parent component that contains the “load”, and then changed the state in the “ componentDidUpdate List” function, but this did not work
jsfiddle
http://jsfiddle.net/wh4z60m6/4/
reactjs
Michael
source share