manu.js manu.js - 6 months ago 49
React JSX Question

How to update a value in reactjs component from outside react

I am new to the technology reactjs. I would like to know how I can show a value from text input which is not rendered using react to a react component which is simply a label which shows that value. Any help would be immensely appreciated.

Thanks in advance..


Simply call the javascript from the React component. E.g.

const value = document.getElementById('text').value;

Here's a fiddle with it all working.