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

Gosling react component does not work with React's StrictMode #1111

Closed
john-conroy opened this issue Feb 14, 2025 · 3 comments
Closed

Gosling react component does not work with React's StrictMode #1111

john-conroy opened this issue Feb 14, 2025 · 3 comments
Labels
bug🐛 Something isn't working

Comments

@john-conroy
Copy link

I ran into errors attempting to use Gosling's react component in an application with StrictMode on. I experienced these errors with both Gosling v0.17.0 and v1.0.0 and React v18.3.1. Disabling StrictMode allowed the component to render.

Cannot read properties of null (reading 'destroy')
Cannot read properties of null (reading 'removeChild')
@john-conroy john-conroy added the bug🐛 Something isn't working label Feb 14, 2025
@dvdkouril
Copy link
Collaborator

Hi, I think I can replicate this in the editor:

// editor/index.tsx

/* ... */

root.render(
    <StrictMode>
        <BrowserRouter>
            <Route component={Editor} />
        </BrowserRouter>
    </StrictMode>
);

Seems to be mostly related to HiGlassComponent2. @sehilyi Does this look like something within Gosling scope or in Higlass?

@sehilyi
Copy link
Member

sehilyi commented Feb 20, 2025

HiGlass is the source of this issue since it uses deprecated React syntax (a message about UNSAFE_componentWillMount). It should be addressed in our new version that removes the HiGlass dependency #1094

@sehilyi
Copy link
Member

sehilyi commented Mar 7, 2025

I will note this in #1094 and close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants