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.
See https://medusa-ui.github.io/documentation/docs/internals/hydra-flow#fragments
<m:fragment service="orderService" ref="checkout" exports="postalZipCode, addressLine2 as address" imports="dob, countryOrigin as country">
Fallback info
</m:fragment>
So there are two layers a variable can live:
An export brings an variable from within the fragment to the parent page
An import brings a variable from the parent page into the fragment
Both could be done via an alias, where the name changes as it crosses the layer boundary
Can this work dynamically at all? IE a value from an input in parent determines the outcome of something in the fragment? Unlikely since this is server rendered, but a potentially common usecase, no? Would that matter, because the JS would be cross field anyway, right? Worth writing out as an example, either way.
So components I want to see:
Fragment with import: http://localhost:8080/import-fragment
Fragment with export: TODO
Fragment with JS interaction across boundaries: TODO
Progress: