Skip to content

Cannot read property 'helmetInstances' of undefined #96

@mschipperheyn

Description

@mschipperheyn

staylor/react-helmet-async#32
I have the problem described above and it's indicated as happening in react-async-component.

Any suggestions?

Activity

oyeanuj

oyeanuj commented on Dec 24, 2018

@oyeanuj

@mschipperheyn How did you end up fixing this? Running into the same thing..

mschipperheyn

mschipperheyn commented on Dec 24, 2018

@mschipperheyn
Author

I did not yet.

mschipperheyn

mschipperheyn commented on Dec 25, 2018

@mschipperheyn
Author

@ctrlplusb did you have a look here yet? staylor/react-helmet-async#32

justnixx

justnixx commented on Jan 7, 2025

@justnixx

You are likely missing the HelmetProvider, which is required. Did you wrap your App component with HelmetProvider? Here's an example:

import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
import { BrowserRouter as Router } from 'react-router';
import { HelmetProvider } from 'react-helmet-async';

import App from './App.tsx';

import './index.css';

createRoot(document.getElementById('root')!).render(
  <StrictMode>
    <Router>
      <HelmetProvider>
        <App />
      </HelmetProvider>
    </Router>
  </StrictMode>
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @mschipperheyn@oyeanuj@justnixx

        Issue actions

          Cannot read property 'helmetInstances' of undefined · Issue #96 · ctrlplusb/react-async-component