Comments (3)
I changed from the template options posted previously and created another project with the settings below.
- Interactive render mode : Auto
- Interactivity location : Global
And I tried global @rendermode to
- InteractiveServer
- InteractiveWebAssembly
- InteractiveWebAssemblyRenderMode(false) - turning off pre-rendering using SSR
, but the result remained the same, it cannot be connected with Redux DevTools.
(App.razor)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<base href="/" />
<link rel="stylesheet" href="bootstrap/bootstrap.min.css" />
<link rel="stylesheet" href="app.css" />
<link rel="stylesheet" href="BlazorApp.Net8Template.InteractiveAutoGlobal.styles.css" />
<link rel="icon" type="image/png" href="favicon.png" />
@if (ApplyInteractiveServer())
{
<HeadOutlet @rendermode="InteractiveServer" />
}
else if (ApplyInteractiveWebAssembly())
{
<HeadOutlet @rendermode="InteractiveWebAssembly" />
}
else if (ApplyInteractiveWebAssemblyPreRenderOff())
{
<HeadOutlet @rendermode="new InteractiveWebAssemblyRenderMode(false)" />
}
else
{
<HeadOutlet @rendermode="InteractiveAuto" />
}
</head>
<body>
<MementoInitializer />
@if (ApplyInteractiveServer())
{
<Routes @rendermode="InteractiveServer" />
}
else if (ApplyInteractiveWebAssembly())
{
<Routes @rendermode="InteractiveWebAssembly" />
}
else if (ApplyInteractiveWebAssemblyPreRenderOff())
{
<Routes @rendermode="new InteractiveWebAssemblyRenderMode(false)" />
}
else
{
<Routes @rendermode="InteractiveAuto" />
}
<script src="_framework/blazor.web.js"></script>
</body>
</html>
@inject NavigationManager NavigationManager
@code {
private bool ApplyInteractiveServer()
{
return NavigationManager.Uri.EndsWith("/SSR", StringComparison.InvariantCultureIgnoreCase);
}
private bool ApplyInteractiveWebAssembly()
{
return NavigationManager.Uri.EndsWith("/WASM", StringComparison.InvariantCultureIgnoreCase);
}
private bool ApplyInteractiveWebAssemblyPreRenderOff()
{
return NavigationManager.Uri.EndsWith("/WASM-NOPR", StringComparison.InvariantCultureIgnoreCase);
}
}
from memento.
Hi !
Thank you for reporting the issue.
You need to declare service registration for both Client Side Project and Server Side project.
Client Side
builder.Services
.AddMemento()
.AddBrowserReduxDevToolMiddleware(new() {
StackTraceEnabled = true,
OpenDevTool = true,
})
.ScanAssemblyAndAddStores(typeof(Memento.Sample.Blazor.App).Assembly);
Server Side
builder.Services
.AddMemento()
.AddBrowserReduxDevToolMiddleware(new() {
StackTraceEnabled = true,
OpenDevTool = true,
}, true)
.ScanAssemblyAndAddStores(typeof(Memento.Sample.Blazor._Imports).Assembly);
I have added the Blazor WebApp sample.
https://github.com/le-nn/memento/tree/main/samples/Memento.Samples.Blazor.WebApp
from memento.
@le-nn
Thank you for your reply.
I have confirmed that it is working with ReduxDevTools, in local execution by using
[samples/Memento.Samples.Blazor.WebApp]
referring to
- samples/Memento.Sample.Blazor
and the nuget package - Memento.ReduxDevTool.Browser(1.7.0)
- Memento.Blazor(1.7.0)
- Memento.Core(1.7.0)
It seems that
[Memento.Samples.Blazor.WebApp]
is applied to the VSTemplate of
- Interactive render mode: Auto
- Interactivity location: Global
, so I think it is compatible with .NET8's @rendermode.
On the other hand, the project I am developing is
- Interactive render mode: Auto
- Interactivity location: Global
so I tried to identify the difference between VSTemplate and
[samples/Memento.Samples.Blazor.WebApp]
,and apply it, but integration with ReduxDevTools did not work well...
Thank you.
from memento.
Related Issues (18)
- Add message haven't handled exception.
- Improvements Typescript message handling
- Implements StateHasChanged method that fires event in Store.
- Add support for chrome redux devtool.
- Detouch react and js/ts bindings. HOT 1
- Add some unit tests for Memento.Core
- Add some unit tests for Memento.Blazor
- Select mode to registor to ServiceCollection.
- Add demo page on GitHubPages
- Config CI test, build, deploy to GitHubPages, and deploy to nuget package provider.
- Update and add docs correctly.
- Change performance test
- Fix an exception that occurred when interrupting an operation HOT 1
- Store API improvements
- ReduxDevTools is not updated
- ReDo / UnDo improvements
- Add support for .NET 8
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 memento.