GithubHelp home page GithubHelp logo

Comments (4)

JonasDoesThings avatar JonasDoesThings commented on September 18, 2024

Hey! @karwan-ali could you please share what errors / problems you encounter when trying to use this component with React Native?

For testing I've just created an expo project and it worked for me. Please share any problems / logs / errors that you encountered

from react-activity-rings.

karwan-ali avatar karwan-ali commented on September 18, 2024

Hello @JonasDoesThings,

Could you provide me the example that is working for you maybe?

This is my code:

const MenuScreen = () => {
  const navigation = useNavigation<CustomerScreenNavigationProd>();

  useLayoutEffect(() => {
    navigation.setOptions({
      headerShown: false,
    });
  }, []);

  return (
    <SafeAreaView style={tw.style('bg-defaultBg w-full h-full')}>
      <ScrollView>
        <ActivityRings
          rings={[
            { filledPercentage: 0.5, color: '#fa0e5a' },
            { filledPercentage: 0.75, color: '#afff02' },
            { filledPercentage: 0.25, color: '#00fff8' },
          ]}
        />
      </ScrollView>
    </SafeAreaView>
  );
};

See attached image on what the error is.
Screenshot 2023-02-12 at 20 57 32

from react-activity-rings.

JonasDoesThings avatar JonasDoesThings commented on September 18, 2024

Hey, I got around looking into the issue, you're right, it's broken when using react-native on non-web platforms.

The cause is the usage of the web-native component and it's descendents.

I've quickly tried forking the project and using react-native-svg as a react-native compatible SVG component, but the next roadblock I've encountered was, that this library does not support animations. It seems like you can use react-native-reanimated for these animations.

Sadly I have no expertise in react-native and currently no time for creating a supported fork, so React Native is out of scope at the current point in time :(

I will add a note into the README accordingly

from react-activity-rings.

JonasDoesThings avatar JonasDoesThings commented on September 18, 2024

Currently out of scope

from react-activity-rings.

Related Issues (1)

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.