Git Product home page Git Product logo

react-native-animated-spinkit's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

react-native-animated-spinkit's Issues

animating={false} ignored on mount

When a spinner is created with initial value animating being false, it is already animating.

Consider following example:
The animating prop is initially false and only later set to true:

import { Circle } from 'react-native-animated-spinkit';
...
const [animating, setAnimating] = React.useState(false); // initially off
...
<Circle size={size} color={color} animating={animating} />

Justification: Sometimes the animation needs to be stopped (because of Detox tests etc.)

Some part of the animation is stuck?

First of all, thanks for the library to be used with Expo!

I found a weird situation. I am using this library within a customized button. Herewith a simple example of the code.
Basically it is a button that can take either text or an icon. And while the button is pressed and being loaded with data, the spinner will show up instaed of the content inside.

const Button = ({
  type = 'icon',
  content,
  loading,
  disabled,
  onPress
}) => {

  const loadingSpinkit = useMemo(
    () => (
      <View style={{ position: 'absolute' }}>
        <Chase
          size={20}
          color='black'
        />
      </View>
    ),
    []
  )

  const children = useMemo(() => {
    switch (type) {
      case 'icon':
        return (
          <>
            <Icon name={content} />
            {loading && loadingSpinkit}
          </>
        )
      case 'text':
        return (
          <>
            <Text children={content} />
            {loading && loadingSpinkit}
          </>
        )
    }
  }, [loading, disabled])

  return (
    <Pressable
      onPress={onPress}
      children={children}
      disabled={disabled || loading}
    />
  )
}

export default Button

When this component is first being loaded, the animation is fine. But after each press, the spinner shows but some part of it will stuck. See image below. I tried several types and all of them have some parts stuck. Is there a reason why?

Screen Shot 2021-01-10 at 15 22 59

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.