-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Change syntax to support closers capturing variables (#140)
* refactor: Change syntax to support closers capturing variables Change syntax from: ```typescript const Counter = qComponent<{}, {count: number}>({ onMount: qHook(() => {count: 0}), onRender: qHook((props, state) => ( <button on:click={qHook<typeof Counter>((props, state) => state.count++)}> {state.count} </button> ) }); ``` to: ```typescript const Counter = qComponent<>(() => { const state = useState(); return onRender(() => ( <button on:click={() => state.count++)}> {state.count} </button> ) }); ``` Co-authored-by: Adam Bradley <[email protected]> Co-authored-by: Manu MA <[email protected]> * fixup! refactor: Change syntax to support closers capturing variables * fixup! fixup! refactor: Change syntax to support closers capturing variables * fixup! refactor: Change syntax to support closers capturing variables * fixup! fixup! refactor: Change syntax to support closers capturing variables * fixup! fixup! fixup! refactor: Change syntax to support closers capturing variables * fixup! fixup! fixup! fixup! refactor: Change syntax to support closers capturing variables * fixup! fixup! fixup! fixup! fixup! refactor: Change syntax to support closers capturing variables Co-authored-by: Adam Bradley <[email protected]> Co-authored-by: Manu MA <[email protected]>
- Loading branch information
1 parent
0cfa168
commit e4493e5
Showing
108 changed files
with
6,954 additions
and
25,484 deletions.
There are no files selected for viewing
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
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
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
Oops, something went wrong.