-
Notifications
You must be signed in to change notification settings - Fork 93
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
feat(signal-slice): add lazySources #197
feat(signal-slice): add lazySources #197
Conversation
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 0965803. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ⌛ The following target is in progress ✅ Successfully ran 3 targetsSent with 💌 from NxCloud. |
I can help with the issue |
Check this commit for fix to issue |
2d79806
to
0965803
Compare
Perfect, this seems to work, thank you! This should be ready to go now |
EDIT: The note below has been resolved
NOTE: This is a draft PR due to one remaining issue and I'm not sure if it can be solved with this set up. I think the crux of the issue is that I am relying on a proxy to detect when the state object is accessed in order to trigger the
lazySources
toconnect
:Although it still seems to work (the observable values are still set into the signal), it triggers the
SIGNAL_WRITE_FROM_ILLEGAL_CONTEXT
error:This adds support for
lazySources
as discussed here: #196It allows specifying
sources
andlazySources
in the config - both are identical but thelazySources
will not be supplied to theconnect
function until the state object has been accessed.I have left this undocumented for now, ideally would like to have it used a little first. I think I also need to do a full sweep through and improve the docs as a whole as well.