Skip to content

Pass component as an argument to React.renderComponent callback #872

@chestozo

Description

@chestozo

There is a callback now in the React.renderComponent method.
Why not pass rendered component into this callback?

This can be useful when you want to call some component method after it was completely mounted, like this:

React.renderComponent(
  <Slider />,
  node,
  function(component) {
    component.setDataSource(data);
  }
);

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