use an optimised incremental mapping from todos to todoComponents