You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just tried to do this, to prevent a transition from running when a component is first rendered (in a situation where skipIntroByDefault isn't an option):
That doesn't work, because transition functions aren't called with component as context. In this case it was easy to fix by passing started as a parameter, but that wouldn't always be the case.
export function wrapTransition(component, node, fn, params, intro) {
- let obj = fn(node, params);+ let obj = fn.call(component, node, params);
let duration;
let ease;
Any reason not to?
The text was updated successfully, but these errors were encountered:
This would've helped me on a project a while ago, where I needed to set a class on a ref as part of the transition.
I can think of lots of potentially dumb things someone might do with full access to the component during the transition -- setting or deleting things -- but maybe that's all fine.
I just tried to do this, to prevent a transition from running when a component is first rendered (in a situation where
skipIntroByDefault
isn't an option):That doesn't work, because transition functions aren't called with
component
as context. In this case it was easy to fix by passingstarted
as a parameter, but that wouldn't always be the case.We could change this line:
Any reason not to?
The text was updated successfully, but these errors were encountered: