REACT Best Practices Type Checking - AndelaOSP/Andela-Socials GitHub Wiki

Use Flow Types

As the javascript project grows without typing, the more difficult refactoring will become. The larger the project the higher the risk when refactoring. Using type checking may not completely eliminate risk but it will greatly reduce it.

Benefits in using flow:

  • On time detection of bugs or errors.
  • Communicates the purpose of the function.
  • It Scales Down Complex Error Handling.
  • Wipes Out Runtime Type Errors.