Build React App

Notetaker app

Watch User Created Playlist (2)

This playlist is user created.

pro-course-rss-logo

PRO RSS Feed

Building stateless function components (new in React 0.14)

Building an accordion component with React

react tutorial about Building stateless function components (new in React 0.14)

Building stateless function components (new in React 0.14)

4:14 react

In React 0.14+, you can write stateless components as pure functions called "stateless function[al] components"; in well designed apps, these "pure" components should be the majority of your application and can be tied together by a few "smart" wrapper components that control your state and pass down needed data to the pure components. In this lesson, we walk through the syntax of stateless function components, converting to them from stateless classes, and best practices in using them with stateful (aka "smart") components.

This lesson assumes use of ES6 and JSX.

react tutorial about Building an accordion component with React

Building an accordion component with React

8:11 react

In this lesson, we build an accordion component (similar to Chrome's native <details> and <summary> elements) with React. We walk through setting up the component render function, props, state, propType validation, and adding conditional inline styling based on the state (if the accordion details are active or not). All done in ES6.

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?