Skip to content
Marie-Louise edited this page Sep 28, 2018 · 2 revisions

A JavaScript library for building user interfaces. It's declarative and component based. react provides components for us to build our own components. we can design, build and test a component all at once and it can be reused

declarative means that our program describes the result we are trying to achieve as opposed to being imperative. Imperative : we describe the process and the steps necessary to get that result

Javascript is mostly imperative HTML is declarative these are programming styles

"A React component will create a representation of its markup in JavaScript using basic JavaScript data types like objects, arrays and strings. This JavaScript representation of the DOM is called the virtual DOM in React."

JSX

"JSX is an extension to the JavaScript language that allows us to use an XML style syntax to build our React.createElement calls. This means typically we need to introduce a built step into our development to translate our JSX code into a regular Java Script.

The compiler weaves to translate JSX code to JavaScript is called Babel and it will do a lot more than just translate our JSX syntax. It can translate features from later versions of JavaScript into a syntax compatible with older JavaScript engines. "

Clone this wiki locally