|
|
|
|
|
by lucideer
1479 days ago
|
|
Let me phrase it in a slightly different way: Vanilla javascript assignments can be any expression. JSX assignments (the brackets) can be any expression. There's no weirdness nor extra limitations to JSX assignments compared to normal vanilla JS. It works exactly the same. If you think not being able to assign JS blocks is weird you're going to have to explain to me what this piece of JS code would do: const val = if (x < y) { func(); }
|
|