swagger-ui-react - update old lifecycle methods
See original GitHub issueQ&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:
- Created 4 years ago
- Reactions:13
- Comments:10 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Bump
Bump AGAIN