question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

swagger-ui-react - update old lifecycle methods

See original GitHub issue

Q&A (please complete the following information)

  • OS: macOS
  • Browser: chrome
  • Version: 78.0.3904.97
  • Method of installation: npm
  • Swagger-UI version: 3.24.3
  • Swagger/OpenAPI version: OpenAPI 3.0

Usage Example:

import SwaggerUI from "swagger-ui-react";

<SwaggerUI spec={doc.openApiSpec!} docExpansion={"none"} key={doc._id!} />

Describe the bug you’re encountering

Getting the following warnings in the browser console:

Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.

* Move data fetching code or side effects to componentDidUpdate.
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state
* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 17.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: Connect(r)


Warning: componentWillUpdate has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.

* Move data fetching code or side effects to componentDidUpdate.
* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 17.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: Connect(r)

Additional context or thoughts

Please update lifecycle methods to use UNSAFE keyword.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:13
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

8reactions
wshartcommented, Dec 1, 2020

Bump

4reactions
DjVreditelcommented, May 5, 2021

Bump AGAIN

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rendering and Updating Data using Component Lifecycle ...
There are several lifecycle methods, which we can override and run based on a particular timestamp, such as mounting the component, updating ......
Read more >
Swagger UI/Editor V4
This includes Hooks, Context API, new lifecycle methods, new event handlers, error boundaries, and more. What are the breaking changes? For ...
Read more >
React Component Lifecycle Old vs New | by Kartik Agarwal
React 16.4 All old methods, aliases and new lifecycle will work, but old methods will give deprecation warning in dev mode.
Read more >
Failed to start bean 'documentationPluginsBootstrapper' in ...
I got same issue using springfox-swagger2 and springfox-swagger-ui version(3.0.0), spring-boot version(2.6.2). The way to resolve this issue is by adding ...
Read more >
ASP.NET Core updates in .NET 7 Release Candidate 1
NET without any dependency on the Blazor UI component model. ... The AddGrpcSwagger method configures Swashbuckle to include gRPC endpoints.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found