Skip to content

immediate method call beaks the slider #1074

Closed
@laveesingh

Description

@laveesingh

Calling slickNext method in componentDidMount of wrapper component, breaks the slider. This happens because it uses slideWidth state to calculate trackWidth while the setState statement from initialize mixin hasn't hasn't done setting slideWidth state due to its asynchrous nature.
Demo: https://codesandbox.io/s/k5mpm3w2or

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions