Created
February 22, 2017 17:44
-
-
Save barneycarroll/52120fea1efcaa30b9f5e4038c22d716 to your computer and use it in GitHub Desktop.
Run global side-effects in-line with Mithril's lifecycle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default function mSideEffects(lifecycle){ | |
m.mount(document.createDocumentFragment(), Object.assign({ | |
view : () => '' | |
}, | |
lifecycle | |
)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment