Where is the best place to call an action that will call the API to hydrate my state? A constructor or one of the life cycle methods, for example. ComponentWillMount?
It is better to make api calls from the lifecycle method componentDidMount, it is also recommended to answer the doc.
componentDidMount
By DOC :
componentDidMount:
componentDidMount() , . , DOM, . , . .
Source: https://habr.com/ru/post/1680362/More articles:How to combine template reference variable with ngIf? - angularЧтение комментариев из файла Excel с помощью PowerShell - commentspowershell outperforms access without installing Excel - powershellHow to export CSV to Excel using Powershell - windows-7Failed to add features of Android Instant App: failed to resolve the basic module of the project - androidHow to write a module declaration that adds another module declaration - amdWhen using Apple's phased version of the application, which version is provided to first time users downloading? - iosAssign the appropriate variables so that these declarations are correct - cHTTPS Facebook URL The URL URL requested an HTTP redirect, but this could not be done - facebook-graph-apiIn the context of ASP.NET why not Task.Run (...). End the deadlock when calling the async method? - c #All Articles