Skip to content

Conversation

@wanjas
Copy link
Contributor

@wanjas wanjas commented Oct 26, 2021

Fixes this issue #83

If an array is passed as percent prop and its length is changed dynamically, 'Rendered more hooks than during the previous render' react error appears.

The issue was in incorrect useRef usage silenced by // eslint-disable-next-line react-hooks/rules-of-hooks

I believe now it works correctly without any change of actual logic.

I've added 1 test and altered the 'gap' example a bit to check if it is working correctly.

@vercel
Copy link

vercel bot commented Oct 26, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/react-component/progress/4PB1ADCRo2BebGQxATLAyK6MMHuX
✅ Preview: https://progress-git-fork-wanjas-master-react-component.vercel.app

@MichelML
Copy link
Contributor

bump to merge this 🙏

@MichelML
Copy link
Contributor

MichelML commented May 18, 2022

working temporary patch released here for those interested https://www.npmjs.com/package/rc-progress-michelml

cc @wanjas

@MichelML
Copy link
Contributor

MichelML commented May 24, 2022

@afc163 any reason why this doesn't get merged? The conflix are easy to fix, would you like me to make another PR with the conflicts fixed?

@afc163
Copy link
Member

afc163 commented May 25, 2022

Sure.

@MichelML
Copy link
Contributor

@afc163 here it is #143

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