1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/web/ synced 2025-03-09 00:00:01 +01:00

API browser: do async request in componentDidMount instead of deprecated componentWillMount

This commit is contained in:
Sonja Happ 2021-03-16 11:25:04 +01:00
parent 772462ead9
commit fbebbd7a14

View file

@ -39,7 +39,7 @@ class APIBrowser extends React.Component {
return spec;
}
componentWillMount() {
componentDidMount() {
this._asyncRequest = RestAPI.get('/api/v2/openapi')
.then((spec) => {
this._asyncRequest = null;