import logo from './logo.svg'; import {useEffect,useState} from 'react'; import './App.css'; function EditorControls(p) { return <> {"<"}{">"} } function EquationGroup(p) { const {equation,setEquation,data,arr,key,id} = p const [myArr,setMyArr] = useState(arr) useEffect(()=>{ var eqArr = [...equation] eqArr[id] = [...myArr] setEquation(eqArr) },[myArr]) return <> (

{arr.map((eq,i)=>Array.isArray(eq)?:eq==="×"||eq==="-"||eq==="+"||eq==="÷"?:)}
) } function EquationOperator(p) { const {equation,setEquation,data,operator,key,id} = p const [op,setOp] = useState(operator) useEffect(()=>{ var eqArr = [...equation] eqArr[id] = op setEquation(eqArr) },[op]) return } function EquationValue(p) { const {equation,setEquation,data,val,key,id} = p const [item,setItem] = useState(val) useEffect(()=>{ var eqArr = [...equation] eqArr[id] = item setEquation(eqArr) },[item]) return

{data[val]}
} function Equation(p) { const {data} = p const [equation,setEquation]=useState([["data2"],"+","data3"]) function SolveEquation(eq) { var newEq = [...eq] //Parenthesis. for (var i=0;i

{equation.map((eq,i)=>Array.isArray(eq)?:eq==="×"||eq==="-"||eq==="+"||eq==="÷"?:)}

{SolveEquation(equation)}

} function App() { const fieldData = { data1:84, data2:49, data3:3.5, data4:67 } return (

); } export default App;