如何将多个参数传递给选择器函数?

How to pass multiple parameters to selector function?

我想做一个这样的选择器函数:

const selectSomethingById = (state, id) => return state.something[id];

我无法正常工作。我会有一些组件这样调用它:

const something = useSelector(selectSomethingById(id));
const something = useSelector(state => selectSomethingById(state, id))