-
Notifications
You must be signed in to change notification settings - Fork 67
CPLAT-3874: Function Components #221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
55 commits
Select commit
Hold shift + click to select a range
e72ba79
inital pass at function components
kealjones-wk d5c2768
format
kealjones-wk e1f4046
fix JsFunctionComponent type signature
kealjones-wk 7a470c9
format
kealjones-wk f1bf6ea
add interop for js null
kealjones-wk 066c9b3
address early pr feedback
kealjones-wk a04508f
format
kealjones-wk d60b834
cleanup
kealjones-wk 3ac59ba
mainly to trigger re-build
kealjones-wk a6d635c
Merge branch '5.1.0-wip' into CPLAT-3874-function-components
kealjones-wk 7b4c28f
cleanup tests
kealjones-wk 71f7cf9
format
kealjones-wk 089b320
Apply suggestions from code review
kealjones-wk dd979ac
address CR feedback
kealjones-wk 61f15f3
format
kealjones-wk bbf4e15
update variable declarations to "const"s
kealjones-wk 7bd9547
fix formatting of js files
kealjones-wk 5446a50
revert comment
kealjones-wk 5f6c05e
Apply suggestions from code review
kealjones-wk 2838077
Update lib/react_client.dart
kealjones-wk d48757b
add function component link to example page
kealjones-wk fb26d5c
Merge branch 'CPLAT-3874-function-components' of https://github.com/c…
kealjones-wk 5c86967
update function component example
kealjones-wk c0d6ae7
address cr feedback
kealjones-wk e685462
revert some changes and cleanup
kealjones-wk cb8c4db
remove unused field and annotate overrides
kealjones-wk aaba9cb
remove accidental test name
kealjones-wk 64d9fa4
cleanup comments
kealjones-wk 756c022
address more feedback
kealjones-wk d984513
remove unused import
kealjones-wk c819a93
remove newline
kealjones-wk fc40326
fix formatting
kealjones-wk fa7a630
address cr feedback
kealjones-wk 52186c8
Apply suggestions from code review
kealjones-wk dd48b08
fix map infurence in context example
kealjones-wk bf0251e
Merge branch 'CPLAT-3874-function-components' of https://github.com/c…
kealjones-wk 5d721bb
fix doc comments
kealjones-wk 1852701
Fix confusing owner test utils and unnecessary isComponent2 flag
greglittlefield-wf 1c89e35
fix formatting
kealjones-wk 40b9ef2
refactor displayName and add tests
kealjones-wk 2092d76
merge 5.1.0
kealjones-wk 0a453d8
re-sync with 5.2.0-wip
kealjones-wk 59de7c6
Merge branch '5.2.0-wip' into CPLAT-3874-function-components
kealjones-wk b69ba40
unify FactoryProxy build methods
kealjones-wk b38fb99
update _generateChildren to handle Iterables
kealjones-wk faadc30
Update comment for registerFunctionComponent
kealjones-wk a8db14c
format
kealjones-wk 213b47d
organize imports
kealjones-wk 01e65a8
update doc comment for JsFunctionComponent
kealjones-wk 5504aa9
Merge branch '5.2.0-wip' into CPLAT-3874-function-components
kealjones-wk af630c7
Apply suggestions from code review
kealjones-wk 1834105
fix bad merge
kealjones-wk 3929947
exclude function name test due to 2.4.1
kealjones-wk 3242857
remove periods because linux
kealjones-wk a6278e0
fix 241 on release
kealjones-wk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
tags: | ||
"fails-on-241": |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import 'dart:html'; | ||
|
||
import 'package:react/react.dart' as react; | ||
import 'package:react/react_dom.dart' as react_dom; | ||
import 'package:react/react_client.dart'; | ||
|
||
import 'react_test_components.dart'; | ||
|
||
void main() { | ||
setClientConfiguration(); | ||
var inputValue = 'World'; | ||
// TODO: replace this with hooks/useState when they are added. | ||
kealjones-wk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
render() { | ||
react_dom.render( | ||
react.Fragment({}, [ | ||
react.input( | ||
{ | ||
'defaultValue': inputValue, | ||
'onChange': (event) { | ||
inputValue = event.currentTarget.value; | ||
render(); | ||
} | ||
}, | ||
), | ||
react.br({}), | ||
helloGregFunctionComponent({'key': 'greg'}), | ||
react.br({}), | ||
helloGregFunctionComponent({'key': 'not greg'}, inputValue) | ||
]), | ||
querySelector('#content')); | ||
} | ||
|
||
render(); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
|
||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> | ||
|
||
<title>React Dart Examples: function component test</title> | ||
</head> | ||
<body> | ||
<div id="content" class="container"></div> | ||
<script src="packages/react/react.js"></script> | ||
<script src="packages/react/react_dom.js"></script> | ||
<script src="function_component_test.dart.js"></script> | ||
</body> | ||
</html> |
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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.