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

Add React to update folder #2202

Merged
merged 2 commits into from
Sep 29, 2023

Conversation

flashdesignory
Copy link
Collaborator

This version has been lifted from Speedometer and follows the WebKit styles guide.
Implementation details: React 17, functional components & hooks...

For more context regarding this update, please view #2199.

@FadySamirSadek - we'd need to see what current version(s) this would replace.

@kara

Copy link
Collaborator

@FadySamirSadek FadySamirSadek left a comment

Choose a reason for hiding this comment

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

Thank you @flashdesignory for the amazing work, I would love to get your thoughts on the comments I left. I think this should be our new official React implementation since most people now use hooks to create their react app and it should also replace the current react-hooks example but I believe we would still need an updated react app that uses class components

updates/react/README.md Outdated Show resolved Hide resolved
updates/react/README.md Outdated Show resolved Hide resolved
updates/react/README.md Outdated Show resolved Hide resolved
- [React](https://reactjs.org/) is a JavaScript library for creating user interfaces.

## Implementation details

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it would be beneficial to add a one-liner to mention that React is primarily considered a view library. However, when combined with other tools it can be a part of an MVC architecture

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I added something... let me know if that works!

updates/react/README.md Outdated Show resolved Hide resolved
};

export function Input({ onSubmit, placeholder, label, defaultValue, onBlur }) {
const handleBlur = useCallback(() => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe using useCallback isn't necessary here, what are your thoughts regarding this ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We did measure a performance gain by using it here.

updates/react/src/todo/reducer.js Outdated Show resolved Hide resolved
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.

None yet

2 participants