We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ae1cd7 commit d28d3e9Copy full SHA for d28d3e9
app/src/components/bottom/CodePreview.tsx
@@ -23,6 +23,9 @@ const CodePreview: React.FC<{
23
24
const ref = useRef<any>();
25
26
+ /**
27
+ * Starts the Web Assembly service.
28
+ */
29
const startService = async () => {
30
ref.current = await esbuild.startService({
31
worker: true,
@@ -58,10 +61,12 @@ const CodePreview: React.FC<{
58
61
store.dispatch({type: "INPUT", payload: currentComponent.code});
59
62
}, [state.components])
60
63
-
64
65
+ * Handler thats listens to changes in code editor
66
+ * @param {string} data - Code entered by the user
67
68
const handleChange = async (data) => {
69
setInput(data);
70
store.dispatch({type: "INPUT", payload: data});
71
if(!ref.current) {
72
return;
0 commit comments