This repository was archived by the owner on Feb 11, 2021. It is now read-only.
This repository was archived by the owner on Feb 11, 2021. It is now read-only.
Suggestion for documentation - PEP with React #255
Closed

Description
In order to get the PEP polyfill working with standard elements in React JSX one must add the 'touch-action' attribute after the component has mounted as non-standard attributes will not be rendered.
eg. this will not render the 'touch-action' attribute:
render() {
<div touch-action="none">does not emit events</div>
}
Whereas this works fine:
componentDidMount() {
this.refs.test.setAttribute('touch-action', 'none');
}
render() {
<div ref="test">emits events</div>
}
This may be too specific specific to include in the documentation, but I thought it might be helpful for those who have run into the same problem.
Metadata
Metadata
Assignees
Labels
No labels