Andrey (azangru) wrote,
Andrey
azangru







Height as any? And the Svelte example is returning a function that is either returning an undefined or a function? And checking for el right after he checked for el? What's wrong with you, people?

The thing that he does with the heightRef must be to bust the closure, which could be done more idiomatically with an updater function: (currentHeight) => ref.current && ref.current.offsetHeight !== currentHeight ? ref.current.offsetHeight : currentHeight
Subscribe

  • (no subject)

    A beautiful cartoon on the front page of The Week:

  • (no subject)

    This is just as bad as a brief exchange with a belligerent guest on a regular news show: Six minutes! Six minutes, during which Rand Paul is…

  • (no subject)

    The war on repetitions:

  • Post a new comment

    Error

    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 3 comments