Hello there! I was searching for a SIMPLE and CLEAN solution for a semi-circular progress. I need to make a simple indicator.
My React-Native app is on version 0.71.2 and I'm not using class components anymore. With a little refactor I remade all the thing with TypeScript in functional style, and it seems to work properly.
The only "error" showing is in line 89, saying that Type 'AnimatedInterpolation<string | number>' is not assignable to type 'string'., but it seems that it doesn't care.
I also fixed (?) a problem with percentage calculation and throw an error if no percentage nor min/max/current are provided. Surely a better work can be done, but at least it's working again!
Hello there! I was searching for a SIMPLE and CLEAN solution for a semi-circular progress. I need to make a simple indicator. My React-Native app is on version 0.71.2 and I'm not using class components anymore. With a little refactor I remade all the thing with TypeScript in functional style, and it seems to work properly.
The only "error" showing is in line 89, saying that
Type 'AnimatedInterpolation<string | number>' is not assignable to type 'string'.
, but it seems that it doesn't care.I also fixed (?) a problem with percentage calculation and throw an error if no percentage nor min/max/current are provided. Surely a better work can be done, but at least it's working again!
Here is the code: