Skip to content

Added type definition file and useNativeDriver prop (default: false)#19

Open
RAMOhio wants to merge 3 commits intoadorableio:masterfrom
RAMOhio:master
Open

Added type definition file and useNativeDriver prop (default: false)#19
RAMOhio wants to merge 3 commits intoadorableio:masterfrom
RAMOhio:master

Conversation

@RAMOhio
Copy link

@RAMOhio RAMOhio commented Mar 13, 2023

This PR implements the following:

  • Adds type definitions.
  • Adds prop descriptions.
  • Adds a useNativeDriver prop that defaults to FALSE.

I should have checked the existing PRs first (there are 2 others that implement a prop to enable the native Animation driver and it appears someone even forked the library and published to npm since the other PRs haven't been merged). Still going to submit this PR since it includes a type definition file and prop descriptions (although it's doing the bare minimum to get that to work).

If you want to use this fork without waiting on PR approval then remove your existing installation and install it from the fork:

npm remove react-native-animated-ellipsis
npm install https://github.com/RAMOhio/react-native-animated-ellipsis.git#master

Afterwards, your package.json should look like:

"dependencies": {
    ...
    "react-native-animated-ellipsis": "github:RAMOhio/react-native-animated-ellipsis#master",
    ...
  },

(this concept will also work with the other forks, or forked npm packages in general)

Examples:

// You can import the package as normal without specifying that it came from a GitHub fork, i.e.:
import AnimatedEllipsis from 'react-native-animated-ellipsis';

// ...

  // Using the native Animation driver.
  <AnimatedEllipsis
      useNativeDriver
  />


  // Not using the native Animation driver.
  <AnimatedEllipsis />

  // ...or:

  <AnimatedEllipsis
      useNativeDriver={false}
  />

// ...

Note: in case anyone doesn't already know, make sure to check back on PRs where you've done a package install directly from GitHub to ensure your libraries are always up to date. Unfortunately this library looks like it might no longer be maintained [ @adorableio ?]

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.

1 participant