How to create a loop with wheel picker in ReactJs
Use the .shift()
and .push()
array methods:
let array = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT'];
array.push(array.shift()); // results in ['MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT', 'SUN']