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

ProgressBar avoidable re-renders #597

Closed
keul opened this issue Oct 14, 2018 · 0 comments
Closed

ProgressBar avoidable re-renders #597

keul opened this issue Oct 14, 2018 · 0 comments
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@keul
Copy link
Contributor

keul commented Oct 14, 2018

I'm submitting a ... (check one with "x")

[ ] bug report
[x] feature request
[ ] support request => Please do not submit support request here, instead see https://forum.primefaces.org/viewforum.php?f=57

Current behavior

Using a ProgressBar component with the why-did-you-update development package enabled I got a lot of warnings:

ProgressBar.props: Value did not change. Avoidable re-render!
Before: {mode: "indeterminate", showValue: true, value: "Loading styles", id: null, unit: "%", …}
After: {mode: "indeterminate", showValue: true, value: "Loading styles", id: null, unit: "%", …}

Expected behavior

Skip avoidable re-renders, probably switching to PureComponent would be enough.

NOTE: not sure if this is a change that can affects other primereact components too.

Minimal reproduction of the problem with instructions

https://codesandbox.io/s/n3jqkvpm0j

(Open the browser's console to see warnings, the default codesandbox console is not working)

  • React version:

16.4

  • PrimeReact version:
    2.0.0-beta9

  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

all

@keul keul changed the title ProgressBar avoidable re-renders unsing PureComponent ProgressBar avoidable re-renders using PureComponent Oct 14, 2018
@cagataycivici cagataycivici self-assigned this Dec 4, 2018
@cagataycivici cagataycivici added Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add Type: Bug Issue contains a defect related to a specific component. and removed Type: Bug Issue contains a defect related to a specific component. labels Dec 4, 2018
@cagataycivici cagataycivici changed the title ProgressBar avoidable re-renders using PureComponent ProgressBar avoidable re-renders Dec 4, 2018
@cagataycivici cagataycivici added this to the 2.0.0 milestone Dec 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

No branches or pull requests

2 participants