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

Replace react-loadable with Suspense/lazy #475

Open
brianlove opened this issue Sep 1, 2023 · 0 comments
Open

Replace react-loadable with Suspense/lazy #475

brianlove opened this issue Sep 1, 2023 · 0 comments
Labels
tech debt Tech debt within the project

Comments

@brianlove
Copy link
Contributor

react-loadable is no longer being updated and uses deprecated React functions. Replace it with Suspense/lazy (see https://github.com/georgetown-cset/science_map_ui/pull/580).

    console.warn
      Warning: componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
      
      * Move code with side effects to componentDidMount, and set initial state in the constructor.
      * Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.
      
      Please update the following components: LoadableComponent

      53 |     // Click on an input node to show its documentation
      54 |     expect(screen.getAllByText("Crystal growing furnaces").length).toEqual(1);
    > 55 |     fireEvent.click(screen.getByText("Crystal growing furnaces"));
         |               ^
      56 |     expect(screen.getAllByText("Crystal growing furnaces").length).toEqual(3);
      57 |
      58 |     // Click on another node inside the documentation panel
@brianlove brianlove added the tech debt Tech debt within the project label Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tech debt Tech debt within the project
Projects
None yet
Development

No branches or pull requests

1 participant