Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What should I do when I need to change more than one states at the same time? #54

Open
templefox opened this issue Mar 26, 2016 · 0 comments

Comments

@templefox
Copy link

In my case.

   getInitialState: function() {
        return {
            visible: this.props.visible,
            height: -1,
        };
    },

I need the tween to change the height, meanwhile changing the visible too.
But I don't want the react refresh the dom twice in this case.
Now I just use the anti-pattern way.
this.state.visible = !this.state.visible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant