The optimistic matching case is the only case when the return path is NOT the same as the input path.
const {path, value} = switchPath('/home/foo', {
'/bar': 123,
'/home': 456,
});
// path is `/home`
// value is 456
This means we have to use the returned path not th imput path.
Would this feature be missed?
The optimistic matching case is the only case when the return path is NOT the same as the input path.
This means we have to use the returned path not th imput path.
Would this feature be missed?