-
Notifications
You must be signed in to change notification settings - Fork 11
Fix frontedAttributes
not using the resolved attribute values
#19
Conversation
.vscode/settings.json
Outdated
@@ -0,0 +1,3 @@ | |||
{ | |||
"editor.defaultFormatter": "dprint.dprint" |
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 it's not the best practice in a large repo to add this file, but I think for convenience and to force people to help test dprint
we should add 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.
Good idea. Thanks, Michal 🙂
@@ -63,7 +63,7 @@ export const hydrate = (container, element, hydrationOptions) => { | |||
break; // break loop on first match | |||
} | |||
}); | |||
io.observe(element.children[0]); | |||
io.observe(container.children[0]); |
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've re-ordered the arguments to match the signature of ReactDOM.hydrate()
.vscode/settings.json
Outdated
@@ -0,0 +1,3 @@ | |||
{ | |||
"editor.defaultFormatter": "dprint.dprint" |
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.
Good idea. Thanks, Michal 🙂
I've introduced a bug in #15!
The
frontedAttributes
should be an object with the values of the attributes. Instead, it was an object with the rawattributes
from theblock.json
which is not what we really want!I've also started using
dprint
and it seems to work fine with the extension, but I notice that the formatting is a little different which is why there are some formatting-related changes in this PR.Also, updated
package-json
so that we get the latestdprint
which can use a local npm installation ofdprint
.