Sign in Go Pro

Advanced React Native

Stateless Functional Components

This lesson is for PRO members.

Upgrade today to get access to all the PRO lessons.

Unlock this lesson
Autoplay

Up next

Previous

About

React Component classes have some overhead that we can avoid by using a technique called stateless functional components.

A stateless functional component is just a function that returns a component. Props are passed in as the arguments to the function, and any React component tree can be returned.

We'll extract the Todo Header into a stateless functional component, and see how to pull that into a new file, and import and use it in the Todo List.

Summary of Content:

  • Add a logout button to the Todo List header
  • Make the logout button work by using screenProps to pass the logout action down the navigation stack.
  • Extract the Todo Header into a stateless functional component
  • Make a TodoHeader file, put the new component there, and import and use it in the Todo List

Instructor

Links

Comments

There are no comments on this lesson, start the conversation below ...

>
You need to go PRO to post comments.

Lessons in Advanced React Native