Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

Disable animations #15

Closed
bkniffler opened this issue Dec 6, 2015 · 4 comments
Closed

Disable animations #15

bkniffler opened this issue Dec 6, 2015 · 4 comments

Comments

@bkniffler
Copy link
Contributor

Hey,
Animations are great, but sometimes apps feel a bit snappier without these. I know we can overwrite them with some animation object like below, but just handing animations={false} or animations={null} would be a bit more intuitiv and comfortable.

<Treebeard animations={false}/>

Thats whats currently necessary:

var animations = {
   toggle: (state) => {
      return {};
   },
   drawer: (/* state */) => {
      return {
         enter: {},
         leave: {}
      };
   }
}
<Treebeard animations={Animations}/>
@alexcurtis
Copy link
Collaborator

@bkniffler Sounds good to me. I'll add them into the current work batch. Thank you!

@alexcurtis
Copy link
Collaborator

@bkniffler There is a change to optimise this further, by not rendering any of the velocity components when this is false. Which is pretty neat.

@alexcurtis
Copy link
Collaborator

@bkniffler. This should be in 1.1.0. As suggested, set animations to false.

@bkniffler
Copy link
Contributor Author

Great, thanks! Works as expected.

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

No branches or pull requests

2 participants