How would you handle global and local state · InterviewLane