Skip to content
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
@ghost

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions