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

feat(useAnimate): new function #2109

Merged
merged 18 commits into from Apr 13, 2023
Merged

feat(useAnimate): new function #2109

merged 18 commits into from Apr 13, 2023

Conversation

tolking
Copy link
Contributor

@tolking tolking commented Aug 21, 2022

Description

close #2077

I wrote some simple examples, source code

Additional context

I refer to the control option to add reactive option for the useAnimate function to return different structures.

  • The control and reactive have different semantics while return different structures.
  • I also thought about splitting into two functions, but I did not find anything similar in this project.

What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

Copy link

@songjianet songjianet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be used as a reference.

packages/core/useAnimate/index.test.ts Outdated Show resolved Hide resolved
packages/core/useAnimate/index.test.ts Outdated Show resolved Hide resolved
packages/core/useAnimate/index.ts Show resolved Hide resolved
@stale
Copy link

stale bot commented Oct 28, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Oct 28, 2022
@antfu antfu added no stale and removed stale labels Nov 1, 2022
@antfu antfu self-assigned this Mar 28, 2023
@antfu
Copy link
Member

antfu commented Apr 13, 2023

This function is great! Thanks, and sorry for the long delay.

I see that the reactive option is purely an addition, right? I refactored it a bit to make it always return those info, which I think fits more with VueUse's conventions.

Let's have it for now. If you have any other suggestions to make, feel free to open new PRs.

@antfu antfu enabled auto-merge (squash) April 13, 2023 10:23
@antfu antfu merged commit bcf5da0 into vueuse:main Apr 13, 2023
3 checks passed
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

Successfully merging this pull request may close these issues.

Add a new function useAnimate
3 participants