16bitash / React-stateful-list---1---Adding-Conditional-Return-Statements-Understanding-K---a6t12d1lvqmg

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stateful list

In this project we will be building a stateful list for showing movies.

We have a data object in src/components/App.js where the keys are years and values are array containing movie names.

Make a select input, where options are the years available in the data object. Also since we want to the select to have no option selected by default, make an option which has its value attribute set to null <option value={null}></option>.

So total number of options will be number of keys in the data object + 1 for the empty option.

Make a div with id="selected-year" which shows "No year selected" by default when no option(empty option) or when year is selected for example 2020 it shows "Selected year-2020".

On selecting the year from it shows the relevant movies from that year in an unordered list like in the demo.

About


Languages

Language:JavaScript 90.4%Language:HTML 9.6%