react
react copied to clipboard
ChildComponnet Re render not working with Key prop in react 18
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
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
Try to create key with random number may be help You .