ReactJS / loaddata() from render function

Tags: #<Tag:0x00007f45329e1488>

I have a pattern like here:

But this gives an error Warning: Cannot update during an existing state transition (such as within render). Render methods should be a pure function…

I want to loaddata() after the data got prepared in the same function and before the HTML is returned. How to do that correct with HOT and ReactJS?

Hi @robert.muench

We are checking your issue and we’ll get back to you soon.

Hi @robert.muench

Sorry for keep you waiting. Here’s a solution to your problem:

Let me know if that helps.