torhovland / blazor-redux

Connecting a Redux state store with Blazor.
Other
482 stars 48 forks source link

Is Location now a required Model parameter? #7

Closed panesofglass closed 6 years ago

panesofglass commented 6 years ago

When building with the latest Blazor-Redux 0.0.4, I get the following:

Program.cs(17,25): error CS7036: There is no argument given that corresponds to the required formal parameter 'getLocation' of 'Store<MyModel, MyMsg>.Store(Reducer<MyModel, MyMsg>, Reducer<MyModel, LocationAction>, Func<MyModel, string>, MyModel)' [/Users/ryan/Code/trail/sample/blazor-redux-standalone/BlazorReduxApp/BlazorReduxApp.csproj]

Is a Location property now required, or am I reading this error incorrectly?

panesofglass commented 6 years ago

Based on the types, it appears this is now required. I think the only thing needed is to update the README so that users know it's a required part of the model. Does it need to be required? Or did I miss an alternative to wiring up the reducer?

torhovland commented 6 years ago

Well, yes, the new routing is a pretty hardcoded requirement right now. I would like to make it optional, using a Redux middleware or something. But for now you'll need to provide a function that can retrieve the Location from your state.