O'Reilly logo

TypeScript Blueprints by Ivo Gabe de Wolff

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Comparing React and Angular

In the previous chapters, we used Angular and in this chapter we used React. Angular and React are both focused on components, but there are differences, for instance, between the templates in Angular and the views in React. In this section, you can read more about these differences.

Templates and JSX

Angular uses a template for the view of a component. Such a template is a string that is parsed at runtime. TypeScript cannot check these templates. If you misspell a property name, you will not get a compile error.

React uses JSX, which is syntactic sugar around function calls. A JSX element is transformed, by the compiler, into a call to React.createElement. The first argument is the name of the element or the element class, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required