Back to front pageView on Hacker News (opens in a new tab)Show HN: 33 line React (opens in a new tab)leontrolski.github.io418 pointsby leontrolski (on Hacker News)6 years agoleontrolski.github.io (opens in a new tab)leontrolski - 33 line ReactComments (156) 28 threadsShow all commentsShowing thread 27 of 28[-]tudorizer6 years ago2 replies#This also doesn't mix pseudo-HTML (JSX?) with JS code, so that's cool.As someone who has sort of lost contact with the front-end world, it's nice to see a coding TL;DR.frosted-flakes6 years ago#Why is it good? JSX is just a declarative syntax for creating DOM elements (usually), and in practice it works really well.s_y_n_t_a_x6 years ago#JSX is syntactic sugar for nested function calls, it is JavaScript.That's why you can do anything (declarative) in them. You can loop, have conditionals, etc. without having to learn a template syntax.
Show HN: 33 line React (opens in a new tab)leontrolski.github.io418 pointsby leontrolski (on Hacker News)6 years ago
tudorizer6 years ago2 replies#This also doesn't mix pseudo-HTML (JSX?) with JS code, so that's cool.As someone who has sort of lost contact with the front-end world, it's nice to see a coding TL;DR.
frosted-flakes6 years ago#Why is it good? JSX is just a declarative syntax for creating DOM elements (usually), and in practice it works really well.
s_y_n_t_a_x6 years ago#JSX is syntactic sugar for nested function calls, it is JavaScript.That's why you can do anything (declarative) in them. You can loop, have conditionals, etc. without having to learn a template syntax.
Comments (156) 28 threads
Show all comments
Showing thread 27 of 28
As someone who has sort of lost contact with the front-end world, it's nice to see a coding TL;DR.
That's why you can do anything (declarative) in them. You can loop, have conditionals, etc. without having to learn a template syntax.