I'd like to write an EditorFor extension for Blazor, so in a .razor file you could do this
@Editor.For(Model.Address);The problem is that I shouldn't new-up a component instance of a component in that code, but use RenderTreeBuilder.OpenComponent<TComponent>. But I can't see a way of getting hold of the current RenderTreeBuilder from inside a .razor file.
Does anyone have any ideas for what I could try?
I don't want to make this an <EditorFor> Component because that would change the scope of @key and would sometimes result in large render tree diffs when updating the DOM - unless there is a way to use OpenComponent<T> without changing the @key scope?