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

Possible: Replace lifecycle= with isolate= #26

Open
michaelpb opened this issue Jan 26, 2023 · 1 comment
Open

Possible: Replace lifecycle= with isolate= #26

michaelpb opened this issue Jan 26, 2023 · 1 comment

Comments

@michaelpb
Copy link
Contributor

Building on: #22

  • Rationale: Using lifecycle=initialized is useful for isolation. Using lifecycle=render is probably not super useful, since you can always just define a callback. Also, inititalizedCallback inside of lifecycle=initialized doesn't get registered, which makes it not as easy to switch between.

  • Move the lifecycle= feature to be a recipe, showing how Script can be extended (or just delete)

  • Add an isolate:=true or context="component" or as="instance" or per-instance:=true or something

  • Then, change code to still call any exported initializedCallback AFTER calling the function itself during initializedCallback() of Script

@michaelpb
Copy link
Contributor Author

freecodinglessons.com - static/libraries/courseware.html

lifecycle="inititalized" doesn't seem to work to isolate a fetch!

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

1 participant