What are the best practices in react for reducing the number of parameters and events callbacks in a complex custom widget, while keeping the component clean and maintainable
Hi @Udit_Shahu,
the following is what I usually follow -
Decluttering the complex widget by defining exact functionality which are necessary.
Maintain a structured folder which might seem hard in the beginning but will be useful considering the complexity.
Grouping related props into an object.
Use a single onChange.
Always move simple logic into helper function and call them.