Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API

From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
How bad would you say it is to have plain javascript in the root of a functional React component lifecyle loop scope.
I sometimes do hardwired modifcations right before the return because I know it needs to run everytime and the performance hit is minimal... Or is it ? 🤔
And sometimes it's just not worth the hassle of all the dependancy management just to save a couple of operations ..?
See pic attached .. Even looking at this picture now I realised I've accidentally added another React hook BELOW this code, luckily only 1.
I think my reasoning for this was to allow some provider functions to be passed around and used anywhere in this app which accesses the context. Is this a no-no too?
question