Coding Challenge

Practice context hooks in React and Python while using Transcrypt.

We'll cover the following

Problem statement

Currently, we have a React application that implements nested components. We use a context hook Ctx to send data to a deep component called Component5 and display it there.

We are not limited to only use one context hook in our application.

In this code challenge, complete these steps:

  • In app.py, add a second context hook called CtxSize that holds the length of the string value that is entered in the top TextField component.

  • Display that value at the bottom of the existing Component5 component as plain text.

Get hands-on with 1200+ tech skills courses.