Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revision for lesson 2 #12

Merged
merged 2 commits into from
Jul 4, 2024
Merged

revision for lesson 2 #12

merged 2 commits into from
Jul 4, 2024

Conversation

kevinb-khan
Copy link
Contributor

Summary:

This PR addresses the feedback for lesson 2. It also adds a warning banner to all exercises letting people know that HMR may not work and that they should reload after making changes to the exercises.

Issue: None

Test plan:

@kevinb-khan kevinb-khan self-assigned this Jul 3, 2024
@kevinb-khan kevinb-khan requested a review from beaesguerra July 3, 2024 18:37
@kevinb-khan kevinb-khan changed the title Revise Lesson 2 revision for lesson 2 Jul 3, 2024
the long term I think we should evaluate possible replaces for <code>redux</code> that don't
have this preformance issue like <code>jotai</code>, <code>zustand</code>, or <code>recoil.js</code>.
- <code>React.useMemo(callback)</code> and <code>React.memo(Component, arePropsEqual?)</code> are
both use to memoize things. The former is used for memoizing computations _within_ a functional
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
both use to memoize things. The former is used for memoizing computations _within_ a functional
both used to memoize things. The former is used for memoizing computations _within_ a functional

emitter?.on("bar", setBar);

return <h1>bar = {bar}</h1>;
}, arePropsEqual);
```

## Notes
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for answering my questions! 😄

@@ -4,6 +4,17 @@ export default function Exercise2() {
return (
<div>
<h1>Exercise 2: Prevent Context From Rendering</h1>
<p>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this, very helpful!

@kevinb-khan kevinb-khan changed the base branch from default-exports to main July 4, 2024 21:55
@kevinb-khan kevinb-khan merged commit fca0244 into main Jul 4, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants