Skip to content

Why unmount on page change? #296

Closed
Closed
@markbrown4

Description

@markbrown4

"On page load, the react_ujs driver will scan the page and mount components using data-react-class and data-react-props. Before page unload, it will unmount components (if you want to disable this behavior, remove data-react-class attribute in componentDidMount)."

Why is this the default? Removing chunks of the DOM when changing pages seems strange.

componentDidMount: ->
  @getDOMNode().parentNode.removeAttribute('data-react-class')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions