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

There are some typos and the fullName method doesn't exist in the User class #11

Open
nickjeon opened this issue Oct 7, 2022 · 1 comment

Comments

@nickjeon
Copy link

nickjeon commented Oct 7, 2022

There are some typos in
https://github.com/lydiahallie/javascript-react-patterns/blob/main/pages/patterns/design-patterns/factory-pattern.mdx

The fullName method is the same for all the objects that were created. By creating new instances, the fullName method is available on the prototype instead of on the objec, which saves memory.

It should be ... on the prototype instead of on the object....

In this section, the fullName method doesn't exist in the User class. There is the getPosts method instead.

https://javascriptpatterns.vercel.app/patterns/design-patterns/factory-pattern#tradeoffs

@oreo2990
Copy link

oreo2990 commented Oct 12, 2022

I think this issue is fix by this PR!

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

No branches or pull requests

2 participants