Convert to a simpler approach not using React components