React Native Progress Bar

React Native Progress Bar

using reanimated2

In this blog, we will create a progress bar using react native reanimated2.

ezgif.com-gif-maker (2).gif

In progress.tsx file we need to import reanimated 2 properties.

carbon (4).png

carbon (6).png

Define the value in useSharedValue for the progress bar and we have to maintain the index and width for keeping track of the progress bar.

carbon (5).png

Based on the index and width we have to manipulate the value for the progress bar.

carbon (7).png

carbon (8).png

Whole code:

carbon (9).png

From the parents component, we have to pass value in the progress bar component

carbon (10).png

GitHub repo: github.com/partTimeCoder96/animation-expo-r..