Closed pingu2k4 closed 2 years ago
Blazor Server only sends UI differences, no actual state is stored in the browser.
However, if you enable ReduxDevTools middleware then the user can modify the state and set it to whatever they want. You should only use that middleware for development.
Aologies for reopening -
I am only using redux dev tools when builder.Environment.IsDevelopment()
is true, however in release mode the redux dev tools appears to be just as functional as it was before?
Is there something I need to do to "turn off" the middelware somehow?
if(builder.Environment.IsDevelopment())
{
builder.Services.AddFluxor(x => x.ScanAssemblies(typeof(Program).Assembly).UseReduxDevTools());
}
else
{
builder.Services.AddFluxor(x => x.ScanAssemblies(typeof(Program).Assembly));
}
Edit your csproj file
<ItemGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<PackageReference Include="Fluxor.Blazor.Web.ReduxDevTools" ...etc... />
</ItemGroup>
Hey, using Blazor server here. My question - I believe that stores can be modified by the user on their end, but does this get pushed back to the server, or are they simply seeing modified data their end that won't make any difference?
Take the counter sample - You can walk back how the page looked with lower counts using the redux devtools. Is this simply showing what the page was like moments after the action you step back to looked like, or is it pushing anything back to the server at all? A user could, I would imagine (I haven't been able to figure out how myself), try setting the store to have the current count be 100. What happens then, and what happens when I hit count++ button?
My guess is nothing, the devtools don't know what the page should look like with this altered state as we haven't seen it before, and it just allows you to step back to see the changes. And when you press the button, it continues counting from where it really is...
I just want to double check though as I don't want users to be able to have the server side think the wrong thing of course.