https://github.com/jtucker/funblazorinaction
An experiment in converting the sample app from Blazor In Action to Fun.Blazor
https://github.com/jtucker/funblazorinaction
blazor blazor-webassembly fsharp fsharp-practice
Last synced: 2 months ago
JSON representation
An experiment in converting the sample app from Blazor In Action to Fun.Blazor
- Host: GitHub
- URL: https://github.com/jtucker/funblazorinaction
- Owner: jtucker
- Created: 2022-09-13T13:21:55.000Z (over 2 years ago)
- Default Branch: chapter-2
- Last Pushed: 2022-10-18T02:43:22.000Z (over 2 years ago)
- Last Synced: 2025-01-21T06:29:38.896Z (4 months ago)
- Topics: blazor, blazor-webassembly, fsharp, fsharp-practice
- Language: F#
- Homepage:
- Size: 903 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Fun.Blazor in Action
A repo where I write the the application example in [Blazor In Action](https://www.manning.com/books/blazor-in-action) using [Fun.Blazor](https://slaveoftime.github.io/Fun.Blazor.Docs/documents/About) project template.
## Chapter 2 Branch
You are currently on the Chapter 2 branch which is the completed excercise from Chapter 2 of the book. This is really just a scaffold and get familiar with the framework type of excercise.
## Fun.Blazor Items
In order to use existing Web Components (e.g. PageTitle) within the computational expression style, you need to generate them via the `fun-blazor` cli tool.
1. Install the cli tool
```bash
> dotnet tool restore
```
1. Add the following attributes to the assembly `PackageReference`:
- `FunBlazor`
- `FunBlazorStyle`
- `FunBlazorNamespace`For Example:
```xml
```
1. Run the cli tool: `dotnet fun-blazor generate .\FunBlazorInAction.fsproj`This gave me access to a new `PageTitle'` computational expression and now the `title` get's updated.
## Notes
- [X] How to bring in existing Blazor component? I need to research this some more as it doesn't seem obvious to me
- [ ] Build scripts, probably `fake`