-
Notifications
You must be signed in to change notification settings - Fork 67
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
Context support #135
Merged
Merged
Context support #135
Changes from 17 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
d2e4beb
Port over initial stab at context
greglittlefield-wf 3ec9436
Fix breaking change to initComponentInternal
greglittlefield-wf e1a44b0
Use internal pattern for individual context keys
greglittlefield-wf 27fea39
Fix JS, conditionally declare context pieces on config
greglittlefield-wf 2408a09
Generate JS files
greglittlefield-wf f772419
Cleanup, naming, docs
greglittlefield-wf bb04f63
Ignore prevContext since it isn't supported in React 16
greglittlefield-wf b80ac0a
Generate JS
greglittlefield-wf bb0bc6c
Rename to handleGetChildContext
greglittlefield-wf 9989c2e
Add prev/nextContext and update docs
johnbland-wf 2e7d74b
Added logging to js build
johnbland-wf f605e0d
Added lifecycle call checks to LifecycleTest
johnbland-wf 88bb52f
Fix errors in react_test examples
johnbland-wf b410e62
Fix errors in ref_test examples
johnbland-wf a8585e8
Fix errors in speed_test examples
johnbland-wf 2fba623
Fix errors in get_dom_node_test examples
johnbland-wf cd9ddaf
Adjust context component to test childContextKeys
johnbland-wf 846c0f1
Update dart_helpers comment
johnbland-wf 987b995
Merge branch 'master' of github.com:cleandart/react-dart into context
johnbland-wf 6e31305
Clean-up / Removed componentDidUpdateWithContext
johnbland-wf 61c6609
Added testing steps to README
johnbland-wf 7861c20
Update example to showcase state updates
johnbland-wf 804ac5e
Use context directly vs transferring context
johnbland-wf 64fbaae
Add JS build to README
johnbland-wf 5f4d403
recieves -> receives
johnbland-wf dc0e5af
Updated example component to show context updates to grandchildren
johnbland-wf 92fbc53
Fix lifecycle calls and add test coverage
johnbland-wf 723caa5
Remove forced context update
johnbland-wf f791d0d
Documentation updates
johnbland-wf f0d8b3a
Use nextContext vs unjsify’ing it
johnbland-wf 282914b
Test updates
johnbland-wf 3602963
Remove context test methods in JS
johnbland-wf 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 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,22 @@ | ||
import 'dart:html'; | ||
|
||
import 'package:react/react_dom.dart' as react_dom; | ||
import 'package:react/react_client.dart'; | ||
|
||
import 'react_test_components.dart'; | ||
|
||
void main() { | ||
setClientConfiguration(); | ||
|
||
react_dom.render(contextComponent({}, | ||
contextConsumerComponent({}), | ||
), querySelector('#content')); | ||
|
||
react_dom.render(contextComponent({}, | ||
contextConsumerComponent({}), | ||
), querySelector('#content')); | ||
|
||
react_dom.render(contextComponent({}, | ||
contextConsumerComponent({}, fooOnlyContextConsumerComponent({})), | ||
), querySelector('#content')); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!DOCTYPE html> | ||
|
||
<html> | ||
<head> | ||
<title>context_test</title> | ||
</head> | ||
<body> | ||
<div id="content"></div> | ||
<script src="packages/react/react.js"></script> | ||
<script src="packages/react/react_dom.js"></script> | ||
<script type="application/dart" src="context_test.dart"></script> | ||
<script src="packages/browser/dart.js"></script> | ||
</body> | ||
</html> |
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
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.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Referencing an old variable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly. I'll dig into it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so, sorry about that. Should probably read
when childContextKeys is non-empty
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed