mrpmorris / Fluxor

Fluxor is a zero boilerplate Flux/Redux library for Microsoft .NET and Blazor.
MIT License
1.24k stars 141 forks source link

inherits Fluxor.Blazor.Web.Components.FluxorComponent in a Class Library project #288

Closed bubbanoosh closed 2 years ago

bubbanoosh commented 2 years ago

Hi @mrpmorris,

We have a situation where we share our Components via a Nuget to other parts of our business, and the Components project in each of our business sectors solution is just a class library.

We have a UI project in our Solutions that contains the Razor Pages, however we keep our actual Components separate in a Class library project so that they can be shared.

We've built our State, Actions, Reducers and Effects in that class library, however we just tried to create a fluxor component in amongst our standard Blazor components in that project and ran into this issue ( I guess as the Class library project doesn't have a dependancy on Blazor itself)

So adding the inherits to the component's .razor file:

@inherits Fluxor.Blazor.Web.Components.FluxorComponent

Gives the error: The type or namespace 'Blazor' does not exist in the namespace Fluxor (are you missing an assembly or reference)

Do you know of any way around this?

By the way, thanks heaps, Fluxor is awesome :)

bubbanoosh commented 2 years ago

HI @mrpmorris ,

Please ignore, I realise I've missed adding Fluxor.Blazor.Web on that project and the other one was picking up Fluxor.Blazor.Web from the DevTools package.

Sorry to waste your time :(

mrpmorris commented 2 years ago

You didn't waste my time :)