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

Allows Loading Spinner to own it's state #4

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

taras
Copy link
Member

@taras taras commented Jan 20, 2024

Motivation

We were relying on a side effect to capture and store state from the loader making the loader operation useless without some state container. I wanted to be able to eventually use this operation to driver loaders in Vue and other rendering systems.

Approach

Instead of storing a callback in the context, I'm now storing a channel which contains a stream of states. I'm now subscribing to the state and calling side effect in the operation.

How do I property type context here?

image

@taras taras requested a review from cowboyd January 20, 2024 18:30
Copy link

netlify bot commented Jan 20, 2024

Deploy Preview for effection-react-loadingspinner failed.

Name Link
🔨 Latest commit 193acaf
🔍 Latest deploy log https://app.netlify.com/sites/effection-react-loadingspinner/deploys/65ac1154caf6750008336a15

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

Successfully merging this pull request may close these issues.

1 participant