-
-
Notifications
You must be signed in to change notification settings - Fork 381
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
implement attribute function #277
Conversation
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 work! Just a small change!
extraProps, | ||
)}>${this.getRequiredChunksScriptContent()}</script>` | ||
} | ||
|
||
getRequiredChunksScriptElement(extraProps) { | ||
getRequiredChunksScriptElement(asset, extraProps) { |
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 don't understand this change. Why changing this signature, you can just call handleExtraProps(null, extraProps)
.
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.
you are correct
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.
Thanks! Could you add some documentation @salzhrani about the new feature on the website?
@salzhrani any news? |
@neoziro I just added some documentation. |
@salzhrani thanks, one last thing, could you rebase please? |
5557baf
to
008084b
Compare
rebased |
Summary
Allow the attributes arguments to be a function to possibly map the chunks to attributes.
Currently it uses the same argument but checks if it is a function or an object.
Also the attribute function could get
null
as an argument in case the__LOADABLE_REQUIRED_CHUNKS__
tagLooking forward to your feedback.
Test plan
tests included