Reverse mapping on computation in component (#1414)

For #1414. ~~A bit stuck on this one. I'm reversing the mapping and the initial render works, but it's not updating (see the test). @Rich-Harris or @evs-chris any insights appreciated.~~