Skip to content

Instantly share code, notes, and snippets.

@dtothefp
Created December 10, 2015 18:04
Show Gist options
  • Save dtothefp/94f147126eaa227c5b28 to your computer and use it in GitHub Desktop.
Save dtothefp/94f147126eaa227c5b28 to your computer and use it in GitHub Desktop.
export default function (dataBindings) {
@provideReactor(dataBindings || {})
@nuclearComponent((props) => {
const {Getters, modalId} = props;
return {
modalState: [...Getters.modalState, modalId]
}
})
return class Modal extends Component {
}
}
const provide = {
Actions: PropTypes.object.isRequired
}
const ModalActions = makeModalActions(reactor);
const Actions = assign({}, ModalActions, WhateverActions)
const Modal = makeModal(provide)
<Modal
modalId='whatevs'
Actions={Actions}
reactor={reactor}
Getters={ModalGetters}
/Modal>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment