react warning cannot set state when using promises

I’m trying to query the server to get list of nav items so I can build my menu on init. I’ve so far managed to create a static page with 3 contents on the home page, which includes header, sidebar and content. The sidebar is the menu which is different for different type of users so I need to retrieve the menu items on load.