Skip to content

Instantly share code, notes, and snippets.

View ArthurMialon's full-sized avatar
🤓
Focusing

Arthur Mialon ArthurMialon

🤓
Focusing
View GitHub Profile
const stateIdLens = propLens('id')
const stateTokenLens = propLens('token')
let setCurrentUserId = (state, action) => set(idLens, action.payload.result, state)
let setCurrentUserToken = (state, action) => set(tokenLens, action.payload.token, state)
compose(setCurrentUserId, setCurrentUserToken)