Skip to content
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

Universal Composition: Render Call Question #60

Closed
ThanosAlmighty opened this issue Oct 8, 2021 · 2 comments
Closed

Universal Composition: Render Call Question #60

ThanosAlmighty opened this issue Oct 8, 2021 · 2 comments

Comments

@ThanosAlmighty
Copy link

ThanosAlmighty commented Oct 8, 2021

Noticed a call to a render(sku) function on line 23 from the sibling level import of render.js

image

When I look at the function in the file, however, the static function name is actually renderRecos().

image

Is this a typo, or am I missing something?

@naltatis
Copy link
Member

renderRecos is the default export of the render.js file.
In custom-element.js imports the module and saves the default export under the name render locally.
I could also have omitted the renderRecos name and only provide an anonymous function but I named it for better readability.

@ThanosAlmighty
Copy link
Author

renderRecos is the default export of the render.js file. In custom-element.js imports the module and saves the default export under the name render locally. I could also have omitted the renderRecos name and only provide an anonymous function but I named it for better readability.

Okay! This is just my lack of familiarity with raw JS. Thanks for clarifying

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants