From abe176d0888c0fdcc803ddafe71a5cee9f4b63a0 Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Fri, 7 Oct 2022 19:44:41 +0200 Subject: refactor(frontend): improve HMR experience Use a HMR acceptor as in https://github.com/vitejs/vite/issues/10227#issuecomment-1256969751 Also updates frontend tooling to the latest version (yarn now support typescript 4.8.4) --- subprojects/frontend/src/editor/EditorPane.tsx | 2 +- subprojects/frontend/src/editor/EditorStore.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'subprojects/frontend/src/editor') diff --git a/subprojects/frontend/src/editor/EditorPane.tsx b/subprojects/frontend/src/editor/EditorPane.tsx index 199a8e1d..0db4b892 100644 --- a/subprojects/frontend/src/editor/EditorPane.tsx +++ b/subprojects/frontend/src/editor/EditorPane.tsx @@ -7,7 +7,7 @@ import useMediaQuery from '@mui/material/useMediaQuery'; import { observer } from 'mobx-react-lite'; import React, { useState } from 'react'; -import { useRootStore } from '../RootStore'; +import { useRootStore } from '../RootStoreProvider'; import ConnectionStatusNotification from './ConnectionStatusNotification'; import EditorArea from './EditorArea'; diff --git a/subprojects/frontend/src/editor/EditorStore.ts b/subprojects/frontend/src/editor/EditorStore.ts index d13f644c..4ee24779 100644 --- a/subprojects/frontend/src/editor/EditorStore.ts +++ b/subprojects/frontend/src/editor/EditorStore.ts @@ -263,4 +263,8 @@ export default class EditorStore { this.client.formatText(); return true; } + + dispose(): void { + this.client.dispose(); + } } -- cgit v1.2.3-54-g00ecf