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

Avoid re-render when clicking the bell in "Display Farmer" and "Add farmer" components #87

Merged
merged 6 commits into from
Sep 20, 2019

Conversation

daquinons
Copy link
Contributor

Description

When clicking on the notification bell a whole rerender occurs that makes the components reload the page. Improve the display to use passed props instead of requiring so many states inside of components.

Checklist

Remove any items which are not applicable.

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works AND the tests pass

@daquinons daquinons self-assigned this Sep 19, 2019
@daquinons daquinons marked this pull request as ready for review September 19, 2019 15:41
@daquinons
Copy link
Contributor Author

Copy link
Member

@quansenB quansenB left a comment

Choose a reason for hiding this comment

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

This looks good, just requires clarification on the dependency array for me to be comfortable to approve it

src/components/App/App.js Outdated Show resolved Hide resolved
Copy link
Member

@quansenB quansenB left a comment

Choose a reason for hiding this comment

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

This is ready for QA now

@Pav0l Pav0l merged commit e8d9352 into master Sep 20, 2019
@Pav0l Pav0l deleted the avoid-rerender-bell branch September 20, 2019 09:27
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.

3 participants