dotnet / MobileBlazorBindings

Experimental Mobile Blazor Bindings - Build native and hybrid mobile apps with Blazor
MIT License
1.2k stars 168 forks source link

Allow passing arguments of any types to the component via Renderer #418

Closed Dreamescaper closed 2 years ago

Dreamescaper commented 2 years ago

NativeComponentRenderer has AddComponent method with Dictionary<string, string> parameters parameter. And there is method TryParse which parses some types from string. But it shouldn't be limited by string in any way, there's nothing wrong with passing any types arguments to component, so I suggest making that Dictionary<string,object> instead.

Now, ShellNavigationManager uses this method, and it is limited by strings. But parsing those parameters is a concern of ShellNavigationManager, and shouldn't affect NativeComponentRenderer, so parsing arguments should be moved to ShellNavigationManager instead.