How to get the pasted value of the event Reactjs onPaste

advertisements

if i have an Reactjs input text element with onPaste event assigned to it, how could I get the pasted value in the response?

at the moment what i get in the console is a SyntheticClipboardEvent with all properties as null. I read that the console.log is a async checker so thats why the majority of values are null as they are looking ahead.

However I am wondering how to get the value.

Cheers


onPaste: function(e) {
    console.log(e.clipboardData.getData('Text'));
},