Skip to content

Remove IComponentContext #13132

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

Merged
merged 1 commit into from
Aug 14, 2019
Merged

Remove IComponentContext #13132

merged 1 commit into from
Aug 14, 2019

Conversation

rynowak
Copy link
Member

@rynowak rynowak commented Aug 14, 2019

Fixes part of: #12553

We don't believe that this is needed anymore. We no longer call
OnAfterRender when you're prerendering, so the main use case of this
type is gone.

The recommendation is to use OnAfterRender and track the state yourself if you want to know whether you're in prerendering or not.

Fixes part of: #12553

We don't believe that this is needed anymore. We no longer call
OnAfterRender when you're prerendering, so the main use case of this
type is gone.
@rynowak rynowak added area-blazor Includes: Blazor, Razor Components API Review tell-mode Indicates a PR which is being merged during tell-mode labels Aug 14, 2019
@rynowak rynowak requested a review from pranavkm August 14, 2019 16:55
@rynowak rynowak merged commit 1f7d59d into release/3.0 Aug 14, 2019
@ghost ghost deleted the rynowak/component-context branch August 14, 2019 19:06
@SQL-MisterMagoo
Copy link
Contributor

Do you have any advice on how services that relied on IComponentContext to know the connection was complete can now test for that?

It seems like the only choices now will be to require a component to "inform" the service(s) that we are connected or to wrap anything that may fail if called too early in the lifecycle in a loop and a try..catch, neither of which are great solutions for testing connectivity.

Thanks

@rynowak
Copy link
Member Author

rynowak commented Sep 4, 2019

I've had some discussions about this already here - #13296

Could you comment there are give me a little more concrete info about your scenarios? My guess is that IComponentContext wasn't a good fit for what you need either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components tell-mode Indicates a PR which is being merged during tell-mode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants