Jenny Mok
Jenny Mok

Reputation: 2804

connect multiple reducers using decorator in redux

I have multiple reducers, how can I use connect? the user is just one of them.

@connect(state=>state.user, {getUser1})
class MyApp extends React.Component {

}

Upvotes: 1

Views: 752

Answers (1)

Ivan Semochkin
Ivan Semochkin

Reputation: 8907

Just include other parts of a state and return it in object

@connect(state=>({user: state.user, other: state.other}))

Upvotes: 3

Related Questions