Once the property was changed, it was the browser that updated the attribute accordingly. I need to get the data-id of the clicked item and pass it to a webservice. Additionally this solution also works without 'printDoc.autoPrint()'. Or if you are not using ajax; put it in hidden textarea and pass to server. But you can use "data-" attributes if you want to avoid conflict or you're the type to lose sleep over it. You'll then get all data in an array. Use via this.props.reactProp inside component's render() method. This is consistent with the way that standard DOM turns dashed names into camel case for Discuss; View Discussion. However, this method can be used to again hide the div. pass all checked checkboxes values, selected values from the list. The below code will work fine (tested) Step 5: The function to take the screenshot is defined inside the