Join Carl Peaslee for an in-depth discussion in this video Rendering rules, part of React: ES6, ES2016, and Beyond.
- [Instructor] In the last video,…we put together this new fields function,…so that when we clicked our new field button…we'd add these new values to state.…Now we need to take those values…and make sure that in the render function…we create a certain number of inputs…based on how many of these new values are in state.…So let's delete this console.log…and we'll scroll up and we're going to make another function,…and we're just going to call this function rules.…This is where we're going to hold…all of the rules input fields,…and we're going to use the arrow function,…and then we're going to scroll down to our render,…and we're going to use object destructuring…to take this out of this,…and we're going to add it to our page.…
So here, beneath this column on line 52,…we'll open up a code brace…and we're just going to call rules.…So we're expecting rules to return…a series, an array of components,…and then we expect that array of components…to be rendered here above the button…where we click new field.…Okay, so now let's go and write that function.…
- Using const and let
- Importing and exporting modules
- Arrow functions
- Destructing assignments
- Arguments and template literals
- Extended parameter handling with the spread operator
- Generating custom styles
- Classes, getters and setters
Skill Level Intermediate
React.js: Building an Interface (2016)with Ray Villalobos1h 21m Intermediate
1. Variables and Declarations
2. Arguments and Template Literals
4. Promises and Async
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.