I am using React-Virtualized.
I would like to setState of AutoSizer width but it gives me warning.
Warning: Cannot update a component (`App`) while rendering a different component (`AutoSizer`). To locate the bad setState() call inside `AutoSizer`, follow the stack trace as described in ....
I understand why it gives me this warning (I am calling setState before the whole
component has finished to be built) but I don't know how to resolve it..
Here is a codesandbox example:
https://codesandbox.io/s/gracious-maxwell-53y2i?file=/src/App.js