This repository was archived by the owner on Dec 14, 2018. It is now read-only.
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
Loosen ViewComponent invoke restrictions #612
Closed
Description
@rynowak and I talked a bit about this in person and I found it very unappealing how in today's world we don't provide a default signature for Invoke/InvokeAsync which makes building ViewComponents inconvenient.
Potential fixes to this could be allowing
Component.InvokeAsync("typeName", "methodName", myparams)
Or some derivative. Even possibly:
Component.Invoke<MyParamObject>("typeName", new MyParamObject(...))
Which would allow us to have a virtual Invoke/InvokeAsync signature.
Of course these are just ideas thrown around and neither may be the right solution to the problem. We should discuss making this API simpler and easier to get started with to prevent users from writing code that never gets invoked.