DEV Community

Discussion on: Mutable and immutable useRef semantics with React & TypeScript

fchaplin profile image
Frederic CHAPLIN

Because in this example case Typescript may :

  • throw exceptions at compile time
  • and give intent to the reader
  • without adding more code.