etn-ccis/blui-react-design-patterns

collapsible appbar throws error on perform state update on unmounted component

Opened this issue · 3 comments

Describe the bug

When the collapsible appbar is collapsed and navigating to another pattern an error is displayed in dev tools. If you refresh from landing page the click through all the appbar examples nothing error's out. If you change the height on collapsible appbar then click another page the error will display

image

  • If this is truly a memory leak, this can be some of the reason why this repo runs slow unit/cypress tests

What is the expected behavior?

What are the steps to reproduce?

  1. http://localhost:3000/collapsible
  2. scroll to collapse appbar
  3. click on next pattern

Screenshots or links to minimum reproduction example

Environment

Anything else to add?

This may be an issue in the component-library rather than the design pattern. Investigate the useEffect hook in the collapsible appBar. May need to return a cleanup function from the useEffect hook.

React design patterns is using very old versions of blui libraries, so unable to test newly built react components on that. We need to test it on cli generated project.

The issue react design pattern throws, when we upgrade blui react components to the latest
Screenshot 2023-03-03 at 12 49 16 PM

moved this back to react design patterns. I was able to create a new project from our blui cli and use the latest collapsible appbar without any issues noticed. Since the current state of design patterns has not been updated not to use mui/styles, create styles...etc this issue can still be produced locally. Once design patterns has been outfitted with latest dependencies and components this issue should not occur.