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
Define the state of a playlist application in a state
array. It should represent this playlist:
- Take Five
- Claire de Lune
- Respect