Open samselikoff opened 5 years ago
You're right. I'm in favor of reducing the default to something more reasonable (as a breaking change).
And I also think it would be fine to expose an option to set it globally once per app.
I was looking for this as well. I think that right now, you can just re-export animated-each
in your app and change some default values in there.
Although this is probably not part of this discussion, but I feel like some good defaults can help a lot - duration, easing, etc. For example, you get really nice looking results just using the defaults of react-spring
.
How do I customize duration for one off transitions? I tried:
constructor() {
super(...arguments);
this.transition = function *(options) {
yield fade({ duration: 1000, ...options});
};
}
But no luck.
@knownasilya I would expect your example work, assuming you're putting that in a component and then passing transition=this.transition
into an animator component.
I thought so too. I updated to latest and still nothing. Basically the fade doesn't happen.
The default of 3000 is quite long, is it possible in userland to set a default?