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

[React.Suspense]: Cannot convert a Symbol value to a string #116

Open
quangrau opened this Issue Nov 2, 2018 · 0 comments

Comments

1 participant
@quangrau

quangrau commented Nov 2, 2018

Hello,

I'm getting this error when using new React's feature Suspense/lazy.

Here's is my AppContent.jsx file:

      <React.Suspense fallback={<Spinner />}>
        <Switch>
          {ROUTES.map(route => (
            <Route
              key={route.pathname}
              path={route.pathname}
              exact={route.exact}
              component={route.component}
            />
          ))}
        </Switch>
      </React.Suspense>

And here's AppContent.test.jsx file:

describe('AppContent', () => {
  test('renders correctly', () => {
    const wrapper = shallow(<AppContent />);
    expect(wrapper).toMatchSnapshot();
  });
});

My package.json:

    ...
    "react": "^16.6.0",
    "react-dom": "^16.6.0",
},
"devDependencies": {
    "jest: "23.6.0",
    "enzyme": "3.7.0",
    "enzyme-adapter-react-16": "1.6.0",
    "enzyme-to-json": "3.3.4"
}

Does anyone get this error like this? I thought this is the same issue which is happened with React.Fragment before. Looking forward to hearing more advice from you guys.

Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment