17

You know that feeling when you're coding late at night and you get an error that you just can't parse with your tired brain, and go FUCK IT ALL, FUCK IT ALL

I'm having that feeling right about now...

Comments
  • 2
    I usually get that error when I'm using this.state = ....
    Outside the constructor
    Another possibility having two set state calls right after each other, but idoubt that's your case
    Or if setState is called in render function
  • 2
    @gitpush I have a hunch of where the problem is but I can’t debug it now, I need to sleep on the problem and come back reinvigorated tomorrow...
  • 2
    Can almost always be solved by breaking up the component into smaller, data driven parts.
  • 0
    @linuswillner best of luck and you made the right decision here, rest and tomorrow you'll be in a better situation to solve it
  • 1
    @NoMaDhOoK Didn’t read your comments until now, but what do you know, it was exactly as you described - I was calling setState within render inadvertently. Coding at 2 AM is really fickle
  • 0
    @linuswillner yup, take my advice whenever you can sleep early and begin your day around 5, I'm most productive between 5:30am and 8am, then I become lazy af lol
Add Comment