import React, { useState, useEffect } from 'react'; export const TextArea = function TextArea({ height, properties, styles, setExposedVariable, registerAction }) { const [value, setValue] = useState(properties.value); useEffect(() => { setValue(properties.value); setExposedVariable('value', properties.value); // eslint-disable-next-line react-hooks/exhaustive-deps }, [properties.value]); registerAction('setText', async function (text) { setValue(text); setExposedVariable('value', text); }); registerAction('clear', async function () { setValue(''); setExposedVariable('value', ''); }); return ( ); };