Re-work the existing logic to use React components instead of plain objects.