13 Matching Annotations
  1. Last 7 days
    1. The best place to initialize a FormValidation instance is inside the component's onMount event:

      Why? Presumably because it needs access to a form element (document.getElementById('loginForm'))...

  2. Oct 2020
  3. Sep 2020
    1. With useEffect, you can handle lifecycle events directly inside function components. Namely, three of them: componentDidMount, componentDidUpdate, and componentWillUnmount. All with one function!
  4. Aug 2020
    1. It's recommended to put the fetch in onMount rather than at the top level of the <script> because of server-side rendering (SSR). With the exception of onDestroy, lifecycle functions don't run during SSR, which means we can avoid fetching data that should be loaded lazily once the component has been mounted in the DOM.
  5. Jul 2020
    1. function that does something asynchronously should provide a callback argument where we put the function to run after it’s complete
  6. May 2020
    1. callback {} (object) – This is the parameter through which you can define the callback that iubenda Cookie Solution can perform upon the occurrence of an event
    1. Callback Alternatively, in the case where cookies are activated by portions of Javascript code, it’s possible to proceed via callback to the instance csConfiguration.