ReactJS / loaddata() from render function

Tags: #<Tag:0x00007f8b28d12440>

I have a pattern like here: https://jsfiddle.net/tqz8pf7e/

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: https://jsfiddle.net/3nfpadug/10/

Let me know if that helps.