Animation in React Native

Animate SVG in React Native

Here, by animating SVG, I mean to change the property of SVG elements dynamically, which will look live-like. In react native, we can generate/render an SVG using the react-native-svg library. A complex SVG comprises many more minor elements that could be animated individually. But here, for example, we will take only one piece, a circle. The following code will draw a circle with a radius of 50 units. <Svg width={200} height={200}> <Circle cx="55" cy="55" r="50" stroke="black" strokeWidth={5} /> </Svg> Suppose we want to animate it to become large and small....

February 5, 2022 · 2 min · Vikas Kumar
OneSignal ReactJs

How to use OneSignal with ReactJs

Using OneSignal with react is fairly easy if one doesn’t care about existing service-worker. But if there is an existing service worker, things may not work as is expected. First, we will create a react app with a service-worker. npx create-react-app my-app --template pwa This should create a folder named 'my-app' containing all the app-related files. To check everything is fine, we can run the following commands, and a browser tab should open with the ReactJs logo....

January 9, 2021 · 3 min · Vikas Kumar