From the course: React for Web Designers
Unlock this course with a free trial
Join today to access over 22,600 courses taught by industry experts.
Everything is components and elements - React.js Tutorial
From the course: React for Web Designers
Everything is components and elements
- [Instructor] When you're writing JavaScript with React pretty much everything is a component, and those components are made up of elements. In this video we'll talk about what might interest us about components. Components are the building blocks of a user interface at whatever level of granularity you think is appropriate. You'll usually have one big one containing everything else, and then it's up to you to figure out what the others should be within that. Defining a React component means writing a function or a class. We'll look at which you'll use in more detail later, but for now, functions are simpler and lighter, also a little less powerful. Classes can do everything that React supports, but are a new feature of ES6, so you might need a polyfill called create-react-class to help you with this. To get started you can usually just work with functions and then enhance them as you need to later. Components are meant to be reusable by you for certain, and maybe by others as well…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
(Locked)
What is React and what is it good for?3m 3s
-
(Locked)
React Toolbox: ES6, JSX, and more2m 52s
-
(Locked)
React concepts and jargon3m 9s
-
(Locked)
Everything is components and elements2m
-
(Locked)
Our React build process47s
-
(Locked)
React and CSS: A special relationship1m 58s
-
(Locked)
Installing React Developer Tools2m 53s
-
(Locked)
-
-
-
-