JSX and Components: JavaScript Instead of Templates, Props, children and Rendering Lists
JSX is not a template language but JavaScript compiled to _jsx() calls at build time; conditions use &&, the ternary and early returns, lists use map with a key taken from the data's own identity. In Bookstore's BookCard, BookList and Layout components we type props with TypeScript, build the counterpart of ng-content with children, and show with real runs that key={index} moves a note to the wrong book, that 0 && prints 0 and that dangerouslySetInnerHTML runs onerror code.
15 Nov 2026
·
12 min
·
4