Skip to content

Passing callback to setState when using React.addons.LinkedStateMixin #4389

@dmitry-vsl

Description

@dmitry-vsl

I think linkState should accept the second argument - callback for passing to setState.

Consider this example. I have a widget that includes a couple of inputs. Whenever any of inputs changes the widget calls this.props.onChange based on values of the inputs. Currently I have to implement my own mixin that passes down callback to setState.

I think it would be reasonable if arguments for linkState were consistent with setState.

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