Building a Spin Wheel in React
Building a spin Wheel was in my to-do list for a very long time; finally, finally i was able to spend time on this. Step 1: Calculate segmentAngle Let's assume we want to show 6 items in the wheel. const itemsCount = 6; Divide the size of the wheel by the number of items => 360/6. const segmentAngle = 360 / itemsCount; Step 2: Identifying Radian & width from segmentAngle You might be thinking, why do we need to identify radians

Building a spin Wheel was in my to-do list for a very long time; finally, finally i was able to spend time on this.
Step 1: Calculate segmentAngle
Let's assume we want to show 6 items in the wheel. const itemsCount = 6;
Divide the size of the wheel by the number of items => 360/6
.
const segmentAngle = 360 / itemsCount;
Step 2: Identifying Radian & width from segmentAngle
You might be thinking, why do we need to identify radians