From 2b87d6a47411bd20b8feec693e0ddb49dbeccfcb Mon Sep 17 00:00:00 2001 From: Kurt Hutten Date: Wed, 10 Mar 2021 20:14:14 +1100 Subject: [PATCH] Add small issue with callback --- web/src/components/IdeEditor/IdeEditor.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/web/src/components/IdeEditor/IdeEditor.js b/web/src/components/IdeEditor/IdeEditor.js index 5686eba..914562a 100644 --- a/web/src/components/IdeEditor/IdeEditor.js +++ b/web/src/components/IdeEditor/IdeEditor.js @@ -6,14 +6,14 @@ const IdeEditor = () => { const { state, dispatch } = useContext(IdeContext) function handleCodeChange(value, _event) { - dispatch({ type: 'updateCode', payload: target.value }) + dispatch({ type: 'updateCode', payload: value }) } return ( ) }