|
|
|
|
|
by danShumway
1063 days ago
|
|
That is an excellent point, thanks for pointing that out. I'm not sure it matters here, the error you're pointing out looks to be getting returned (unless I'm misunderstanding what the book intends the `error` function to do), and creating an Error in Javascript is fine, it doesn't break your program until it's actually thrown. Edit: just looked at your comment again, and you're saying it does actually throw the error rather than returning it :) So double-corrected on my part :) But your point stands regardless. There will be scenarios where what you're talking about matters -- JSX also follows this pattern of immediate evaluation and yeah, I see errors from that plenty of times. So it's good to mention. |
|