Last active
October 21, 2022 14:20
-
-
Save Grubba27/45a73085a551fd3c4442e6d4df1ceaca to your computer and use it in GitHub Desktop.
simple example of using this
This file contains hidden or 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
| function outer(props) { | |
| const self = this; | |
| self.outer = 'outer'; | |
| function inner(props, ctx) { | |
| const self = this; | |
| self.inner = 'inner'; | |
| ctx.outer = 'outer-malucao' | |
| return { | |
| inner: self.inner, | |
| ctx: ctx.outer, | |
| props | |
| }; | |
| } | |
| return inner(props, self); | |
| } | |
| outer('some') | |
| // ^^{inner: 'outer-malucao', ctx: 'outer-malucao', props: 'some'} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment