Updating new episode data

As the user enters new data into the Create Episode form, we have to update the create state. This works much in the same way as the form controls that filter episodes:

document  .querySelector('form[name="create-episode"] input[name="title"]')  .addEventListener('input', e => app(state => state.setIn(    ['create', 'title'],    e.target.value  )));document  .querySelector('form[name="create-episode"] input[name="director"]')  .addEventListener('input', e => app(state => state.setIn(    ['create', 'director'],    e.target.value  )));document  .querySelector('form[name="create-episode"] input[name="date"]')  .addEventListener('input', e => app(state => state.setIn(    ['create', 'date'],    e.target.value  )));document .getElementById('new-episode-rating') ...

Get Mastering Immutable.js now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.