reading-notes

Context API

Context API

1. What can React Context provide your app?

React Context will allow my app to pass data down to children components without having to manually pass down props.

2. Why might we use Context?

We might use Context for declaring global variables.

3. Why should we use it sparingly?

We want to use it sparingly, because it makes reusing components difficult.

1. Consume content from (at least) two of the Awesome React Context links. Share your take-away from each:

  1. Takeaway 1: Constate has me looking at things differently. In their example code in API, they have multiple little functions that seemingly all carry separate logic, but then tie into their <App /> component. What was puzzling to me was that they created state in its own function, without nesting it into App, as we’ve done in class. I think I need to re-imagine how I develop and structure my apps.

  2. Takeaway 2: The themer example on CodeSandbox has a syntax error and won’t load, properly. I wanted to use this as a reference, but I shouldn’t go around fixing reference material. That beings said, I like the idea of having a global toggle for day and night modes.

Additional Questions

1. Looking ahead at this module’s course schedule, What do you look forward to learning?

I’m looking forward to Cookies. I’ve heard the term a lot and see the popup every time I go to a new website, but what is it really?

2. What are your learning goals after reading and reviewing the class README?

My learning goal is to develop solid fundamental programming principles, so I can translate my skills over to all sorts of programming languages and programs.

Things I Want To Know More About

In-class Note

Previous Reading

Next Reading