skip to Main Content

React – state updated in element inspection but not in actual DOM – Reactjs

I'm just trying to build a frontend builder React app. Everything goes as expected but not one. const [displayContent, setDisplayContent] = useState( props.contentInside.html ); <button onClick={() => { props.changeLanguage("HTML"); setDisplayContent(props.contentInside.html); }} > HTML </button> <button onClick={() => { props.changeLanguage("CSS"); setDisplayContent(props.contentInside.css);…

VIEW QUESTION
Back To Top
Search