Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
patdx
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
3 ms
·
1.
▲
by
patdx
3y ago
The big problem is Express code like the following will either hang the HTTP request forever (--unhandled-rejections=warn), until the client times out and gives up, or crash your whole server, taking down any other HTTP requests in progre
2.
▲
by
patdx
4y ago
That’s a good point, that example does feel a bit contrived. Interestingly though it is actually “canon” to call setState within the render function (for certain rare situations). I didn’t actually know this until I read the React beta docs
3.
▲
by
patdx
6y ago
Basically yes, though `{` and `}` also start and end expression blocks in JavaScript. So the JS formatter needs to be aware that it is working with a JSON object and not a complete expression. Valid JSON: { "key1": "h