Skip to content

REACT Best Practices Organizing functions

Patrick Alvin Luwum edited this page Jun 20, 2018 · 1 revision

Use Accessor Functions

For better code refactoring move all your functions which do filtering, parsing and other data transformation logics into seperate file and import them to use those functions inside your connect method of react-redux as shown.

image

image

By doing this, it will be easy to add flow types for your functions.