react icon indicating copy to clipboard operation
react copied to clipboard

ChildComponnet Re render not working with Key prop in react 18

Open yashaswinibprasad87 opened this issue 3 years ago • 2 comments

I am using a class component that has MUi tab. Unable to re render with the latest data inside child component .

  • When I switch tabs Re-Render happens with old data of another tab though key is provided inside <TabPanel>

case "layout": return ( <Suspense fallback={Loading ...}> <XYZ key={content.key + index} type="Lyt" parentTabDetails={content} parentTab={content.Title} /> </Suspense> );

Breaking changes in 18.0 (Working as expected in 17.0.2 ) KIndly provide a fix or solution Help Appreciated

yashaswinibprasad87 avatar Jul 01 '22 07:07 yashaswinibprasad87

It doesn't look like this bug report has enough info for one of us to reproduce it.

Please provide a CodeSandbox (https://react.new), or a link to a repository on GitHub.

Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve

eps1lon avatar Jul 03 '22 09:07 eps1lon

Try to create key with random number may be help You .

RAJEEV2510 avatar Jul 25 '22 04:07 RAJEEV2510