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

[Feature Request]: chains #27

Open
lopi-py opened this issue Jun 1, 2022 · 0 comments
Open

[Feature Request]: chains #27

lopi-py opened this issue Jun 1, 2022 · 0 comments

Comments

@lopi-py
Copy link
Contributor

lopi-py commented Jun 1, 2022

Hello, nice module! I'd like to chain animations in a clean way. I think might there 2 ways:
1.

local styles1, api1 = ...
local styles2, api2 = ...
local styles3, api3 = ...

RoactSpring.useChain(hooks, api1, api2, api3, ...)

2.

local styles, api = RoactSpring.useChain(hooks, {
    -- initial state
    from = { value = 0 },
})

api.start({
    value = 2,
    -- can accept other keys too
    immediate = true,
    config = {},
}, {
    value = 1,
}, {
    value = 3,
})
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