Skip to content Skip to sidebar Skip to footer

Why A Newline Between `return` And `(` Breaks The Code?

Based on the solution of my question: setState fires and render method gets hit, but nothing rerenders Code works if there is NO newline between return and the (, and fails otherw

Solution 1:

Seems like Automatic Semicolon Insertion might be biting you in the butt. I believe javascript will insert a ; at the end of a return statement automatically.

Why doesn't a Javascript return statement work when the return value is on a new line?

Solution 2:

Post a Comment for "Why A Newline Between `return` And `(` Breaks The Code?"