Conversation
goatslacker
approved these changes
Jul 6, 2018
brucewpaul
approved these changes
Jul 6, 2018
Contributor
brucewpaul
left a comment
There was a problem hiding this comment.
One question, but either way 👍
| export function makeOptions(options) { | ||
| const { attachTo, hydrateIn } = options; | ||
|
|
||
| if (attachTo && hydrateIn && attachTo !== hydrateIn) { |
Contributor
There was a problem hiding this comment.
would there ever be a case when both are present? Do we just want to not allow this and then hydrate -> attach on pre16 versions?
Member
Author
There was a problem hiding this comment.
So, I’ve normalized the options here - which means it will end up having both the best time it hits this code path. So altho users really shouldn’t supply both, i cant think of how to differentiate between user options and things passed in via shallow calls or adapter options etc.
ljharb
added a commit
that referenced
this pull request
Aug 8, 2018
- [new] add `isFragment` (#1733) - [new] Add `displayNameOfNode`, `isValidElementType` - [new] `mount`: add `hydrateIn` option (#1317, #1707) - [new] Add support for react context element types (#1513) - [new] `shallow`: Add getSnapshotBeforeUpdate support (#1657) - [fix] portals and roots may render fragments (#1733) - [fix] add missing support for animation events (#1569) - [fix] `shallow`: SFCs do not get a `this` (#1703) - [refactor]: add “lifecycles” adapter option (#1696) - [fix] call ref for a root element (#1541) - [fix] Allow empty strings as key props (#1524) - [fix] Fix ShallowWrapper for array-rendering components (#1498) - [refactor] use `react-is` package - [meta] ensure a license and readme is present in all packages when published
This was referenced Aug 8, 2018
This was referenced Oct 1, 2018
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #1316
Reviewers: please help ensure that the following scenarios will work after this PR: