/
vshmidt
/
label-studio
Обзор
Документация
Войти
/
vshmidt
/
label-studio
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
web/libs/editor/src/Component.jsx
29 строк
714 B
Raul Martin
refactor: echo 27: Introducing biome (#5759)
29 апр 2024, 11:39
Не верифицирован
29 апр 2024, 11:39
2660ec9
Код
Авторство
О чём код?
import { Component } from "react"; import App from "./components/App/App"; import { configureStore } from "./configureStore"; export class LabelStudio extends Component { state = { initialized: false, }; componentDidMount() { configureStore(this.props).then(({ store }) => { this.store = store; window.Htx = this.store; this.setState({ initialized: true }); }); } componentDidUpdate(prevProps) { if (this.props.task !== prevProps.task) { this.store.resetState(); this.store.assignTask(this.props.task); this.store.initializeStore(this.props.task); } } render() { return this.state.initialized ? <App store={this.store} /> : null; } }