Skip to Content
Learn
Core Concepts in Redux
State

State is the current information behind a web application.

For a calendar application it includes the events (name, date, label, etc.), the current timezone, and the display filters. For a todo app it includes the todo items (description, completed/not completed), the current order of the items, and display filters. For a word editor, it includes the contents of the document, the print settings, and comments.

With Redux, state can be any JavaScript type, including: number, string, boolean, array, and object.

Here’s an example state for a todo app:

const state = [ 'Print trail map', 'Pack snacks', 'Summit the mountain' ];

Each piece of information in this state—an array in this case—would inform some part of the user interface.

Instructions

1.

Define the state of a playlist application in a state array. It should represent this playlist:

  1. Take Five
  2. Claire de Lune
  3. Respect
Folder Icon

Take this course for free

Already have an account?