Skip to content

React State & Event Handling

At the end of this class, you should be able to…

  • Explain the concept of state in React and why it is necessary.
  • Use the useState hook to manage and update component state.
  • Implement event handlers to handle user interactions.
  • Modify component behaviour dynamically based on state changes.

In-Class Demo Jan 2026 term

To run the coding demo, you need to have your Student Workbook open in Visual Studio Code.

  1. Open the terminal window and paste in the following.

    Run from the root of your repository
    pnpm dlx tiged --disable-cache --force DG-InClass/SDEV-1150-A04-Jan-2026/sk/lesson-30 ./src/lesson-30
  2. Walk through the steps in the ReadMe.md of the new lesson.