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

[RFR] Fix sending request by Query with deep props on every update #3176

Closed

Conversation

PPierzc
Copy link
Contributor

@PPierzc PPierzc commented Apr 29, 2019

  • Changed shallowEqual to deepEqual in Query to accommodate for possible deep props.

  • Changed the placement of myPayload variable.
    When myPayload is global the objects are indeed identical and the script worked did pass. However, this assumes independency from props, which is not desired. This can easily lead to endless loops.

Solves #3174

@PPierzc PPierzc changed the title [RFR] Fix sending request by Query with deep props on every update [WIP] Fix sending request by Query with deep props on every update Apr 29, 2019
@PPierzc PPierzc changed the title [WIP] Fix sending request by Query with deep props on every update [RFR] Fix sending request by Query with deep props on every update Apr 30, 2019
Copy link
Member

@fzaninotto fzaninotto 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 taking the time to fix this.

@@ -1,5 +1,5 @@
import { Component, ReactNode } from 'react';
import { shallowEqual } from 'recompose';
import equal from 'deep-equal';
Copy link
Member

Choose a reason for hiding this comment

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

deep-equal isn't a direct dependency. use lodash/isEqual instead

@djhi
Copy link
Collaborator

djhi commented May 22, 2019

Any update?

@fzaninotto
Copy link
Member

Superseded by #3267

@fzaninotto fzaninotto closed this May 23, 2019
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