Preloading data in a settings widget

Hi all,

I’d appreciate some pointers with an issue we’ve facing right now.

We have a widget that’s configured as a settings widget within the LiveChat portal.

We have a main index.js, which loads an App component, which in turns loads a TabHeader, TabContentWrapper and sets the TabContent to our Settings component.

The Settings component fetches data from our custom webservice during the useEffect phase. This works fine when testing locally, however when we test within the LiveChat portal the fetch does not happen when navigating to our widget.

useEffect is called when we click Submit and then brings back the existing data and the widget works as expected.

Any ideas on how to get the app loading the config when the pages loads?


Hello :wave:

Could you provide us with more details, like the info from Console?
There may be an error returned.

Hi Lukasz,

This seems to have resolved itself.

I have another question related to this same plugin but will ask it in a new thread.