Comments (8)
Condition 3) above is reproducable in Fluxor counter and blazor-fluxor samples. So fluxor does not preseve state between refreshes of browser? Is that by design? I thought it is analogous to session state.
from fluxor.
Re #3. That's the way Blazor works. If you do a physical refresh then it creates a new connection to the server and is equivalent to creating a new session.
As for your other problems, it's difficult for me to see what is going on. One thing that struck me as being a bit odd is that you are using two-way binding against what should be read-only state.
Change @bind-Enabled="@state.Value.States[0].Visible"
to [email protected][0].Visible
and see if that makes any difference.
from fluxor.
As I've not heard back I am going to assume this was related to mutable state and two-way binding. If this is not the case then please get back to me and I'll reopen and try to help you to resolve your problem.
from fluxor.
from fluxor.
https://github.com/CD1010/BlazorWizard/tree/StepActivations This is the code i am referring to in this issue.
I now understand the limitations in Blazor regarding item 3 above. I don't much like that, however. I am thinking i need to store state in localstorage also, so it survives refreshes. Something like good old Session behavior is what i am looking for.
As for 1 and 2, I still see that behavior no matter what i try. Is that an issue in fluxor or something i am doing wrong? Thanks. Try hitting "Toggle State" button and you will see state rendered is always one button click behind.
from fluxor.
I see it. I will investigate. Thanks!
from fluxor.
It is because you are iterating over the steps and showing Step.Enabled and then, after that, you are displaying the steps (which will bind the properties of the steps).
Put this in Wizard Step
protected override void OnParametersSet()
{
base.OnParametersSet();
System.Diagnostics.Debug.WriteLine("Set parameters on: " + Name + " Enabled = " + Enabled);
}
And this inside your Wizard.Razor
@{System.Diagnostics.Debug.WriteLine("Rendering wizard");
The output will look like this
All On
States
True
True
True
Set parameters on: One Enabled = True
Set parameters on: Two Enabled = False
Set parameters on: Three Enabled = True
Rendering wizard
Set parameters on: One Enabled = True
Set parameters on: Two Enabled = True
Set parameters on: Three Enabled = True
from fluxor.
@foreach (var item in Steps.Select((x, i) => new { Step = x, Index = i}))
{
item.Step.SetEnabled(state.Value.States[item.Index].Visible);
... your code here...
}
Ideally, you should be working from store state.
from fluxor.
Related Issues (20)
- Chaining actions HOT 6
- .NET 8 server-side rendering doesn't work with Fluxor HOT 6
- RobiniaDocs API Explorer
- Can't locate issue HOT 6
- Please review PR 454 (Uri.Compare, routes with #fragments) HOT 5
- Fluxor on Blazor .NET 8 Preview RC2 HOT 1
- Is there a way to use Fluxor with the new Blazor Web App paradigm? .NET8.0 HOT 37
- StoreInitializer not working in Balzor .net 8 HOT 4
- Fluxor.Blazor.Web.Components.FluxorComponent does not work in .NET 8 HOT 2
- Fluxor dont work with new template .Net 8 and InteractiveServerRenderMode HOT 2
- Fluxor breaks ErrorBoundary in Blazor Wasm HOT 2
- Fluxor Redux Dev Tools eating ram HOT 5
- Fluxor.Blazor.Web.ReduxDevTools requires script-src 'unsafe-eval' on CSP HOT 1
- Subscribing external events HOT 2
- Blazor server app in used Redux(Fluxor) in asp .net core error Unable to resolve service for type 'Fluxor.IFeature` while attempting to activate 'Fluxor.State` HOT 2
- Dispatch from Polly HOT 4
- Dispatching action in effect - running orders HOT 1
- Fluxor does not seem to work with the new .NET 8 Blazor Web App template HOT 2
- Deadlock when dispatching from store/feature events HOT 3
- Reducer not getting invoked in .NET 8 Blazor HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fluxor.