Skip to content

Conversation

@mind0bender
Copy link

This pull request addresses a potential point of confusion in the React example provided on the Anime.js website, specifically on the Using with React documentation page.

The original code used the same name, scope, for both the React useRef object and the argument passed to the createScope().add() callback.

This PR renames the callback argument to animationScope to clearly distinguish it from the scope ref.
This change improves the readability of the code and reduces the risk of misinterpreting the purpose of each variable.

Original code snippet (for reference):

  const scope = useRef(null);
  // ...
  scope.current = createScope({ root }).add( scope => {
    // ...
    scope.add('rotateLogo', ...);
  });

Modified code snippet:

  const scope = useRef(null);
  // ...
  scope.current = createScope({ root }).add( animationScope => {
    // ...
    animationScope.add('rotateLogo', ...);
  });

@juliangarnier
Copy link
Owner

Fixed thanks!

@mind0bender
Copy link
Author

Hi @juliangarnier,

I noticed that my pull request for the documentation updates was recently closed. As this was my first contribution to an open-source project, I was hoping you could provide some insight into the reasons for its rejection.

Thank you for your time and consideration.

@juliangarnier
Copy link
Owner

Hi @mind0bender, what you have modified is the generated static files of the website, not the source.
I would have to make the changes to the source code of the site myself anyway.

The readme file of the gh-pages branch says:

The website and docs are generated from a private repo, if you found a typo, want to suggest a change or addition to the docs, please open an issue.

@juliangarnier
Copy link
Owner

I updated the readme of the gh-pages to avoid confusion:

Contributing to the documentation

[!CAUTION]
Do not create a PR

The website and documentation are generated from a private repository.
If you found a typo or want to suggest a change or addition to the docs, please open a documentation update issue following the documentation update template and attach the "documentation" label.

Thanks for your contribution.

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.

2 participants