global-methods

ReactJs Global Helper Functions

核能气质少年 提交于 2019-12-10 12:28:14
问题 Issue: I have a lot of small helper functions that don't necessarily need to live in a component(or maybe they can but they will make that component bloated with a lot of code).My lazy side just wants to just let those all just be some sort of global functions that the components can call.I really want to make good ReactJs code. Question: What are the best practices in terms of global helper functions in Reactjs? Should I force them into some sort of component or just shove them into the