16 Matching Annotations
  1. Sep 2020
    1. useField() returns FieldRenderProps. It will manage the rerendering of any component you use it in, i.e. the component will only rerender if the field state subscribed to via useField() changes.
    1. I don't think componentDidRender is a substitute for componentDidMount because the component can render multiple times when props change after it's mounted once.
  2. Aug 2020
    1. In the two years that I've been working with React professionally, I've never come to a point where I needed to force a re-render. I encourage you to read the article from the beginning if that's what you're here for because usually there's a better way of dealing with React components that aren't updating.
  3. Jan 2020
  4. Dec 2019
    1. server-side rendering is strict about configuration, and the best way to find out what's wrong is to compare your project to an already working setup. Check out the reference implementations, bit by bit.
  5. Nov 2019
    1. // require('hammerjs') when in a browser. This is safe because Hammer is only // invoked in componentDidMount, which is not executed on the server. var Hammer = (typeof window !== 'undefined') ? require('hammerjs') : undefined
    1. you can update the state right during rendering. React will re-run the component with updated state immediately after exiting the first render so it wouldn’t be expensive
  6. Sep 2019
  7. Aug 2019