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

Update MVC lesson example, add MDN link to MVC #727

Merged
merged 2 commits into from
Jul 19, 2023

Conversation

sertmer
Copy link
Collaborator

@sertmer sertmer commented Jul 17, 2023

This PR addressed issue #710

Summary of changes needed:

  • The current lesson uses a class based component to describe the MVC pattern
  • This example needs to be updated to be a functional component
  • Any language in the lesson that is referring to that class based component may also need to be updated
  • The lesson should include a link to the MVC pattern architecture page on MDN

Changes Made:

  • All of the above

Questions

  • Please review my react code - I was feeling a bit rusty!
  • No other specific considerations

@sertmer sertmer mentioned this pull request Jul 17, 2023
}
}
function App() {
const [count, setCount] = useSate(0);
Copy link
Contributor

Choose a reason for hiding this comment

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

Just missing a 't' in state here :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thank you! ✅

Copy link
Contributor

@hfaerber hfaerber left a comment

Choose a reason for hiding this comment

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

Thanks for working on this Scott! I made 2 comments on the code example.
Could you also edit the very end of the lesson please?

  • In the Wrapping it up section, can you please remove "How does Redux play into this? Work on this for 10 minutes, then we’ll reconvene."
  • In the References section, can you please stack the two links so its clear there are two?

@@ -63,35 +63,31 @@ for this pattern, you will find it all over the place.
![MVC interactions](https://www.tutorialspoint.com/sencha_touch/images/mvc.jpg
"Data flow in MVC")

Take a look at [the docs on MDN](https://developer.mozilla.org/en-US/docs/Glossary/MVC) if you'd like to see it explained in another way.

### Ok, by why would I ever use it?

You've already been using it! Let's consider a super simple example:

```js
import React, { Component } from 'react';
Copy link
Contributor

Choose a reason for hiding this comment

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

We should be able to remove the {Component} import here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@sertmer
Copy link
Collaborator Author

sertmer commented Jul 19, 2023

Thanks Heather! I made those changes and I'll merge it now!

@sertmer sertmer merged commit 8989cda into gh-pages Jul 19, 2023
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