question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Clean up naming and layout for the new Blazor weather page

See original GitHub issue

Here’s where things stand with the new Blazor weather page:

  • Component name: ShowData.razor
  • Page heading & title: <h1>Weather forecast</h1>
  • Nav bar text: “Fetch data”

To clean this up, how about this?:

  • Component name: Weather.razor
  • Page heading & title: <h1>Weather</h1>
  • Nav bar text: “Weather”

Issue Analytics

  • State:closed
  • Created 3 months ago
  • Reactions:3
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
danroth27commented, Jun 11, 2023

Also, should we rename the Index.razor to Home.razor?:

So instead of this:

  • Component name: Index.razor
  • Page heading & title: <h1>Index</h1>
  • Nav bar text: “Home”

We could do this:

  • Component name: Home.razor
  • Page heading & title: <h1>Home</h1>
  • Nav bar text: “Home”

I know there’s some history around the name “index” being special in web app development, but it’s not actually special in Blazor and it’s a weird name to put in front of the end user. I could also live with this:

  • Component name: Index.razor
  • Page heading & title: <h1>Home</h1>
  • Nav bar text: “Home”
0reactions
danroth27commented, Jun 21, 2023

Should @page also change for Weather.razor to @page “/weather”?

Yup

Read more comments on GitHub >

github_iconTop Results From Across the Web

Best 9 Practices to Follow While Developing Blazor ... - YouTube
Join this channel to get access to perks: https://www.youtube.com/channel/UCRs-PO48PbbS0l7bBhbu5CA/join SHOW YOUR SUPPORT FOR AK ACADEMY ...
Read more >
ASP.NET Core Blazor layouts
In this article. Layout components; Apply a layout; Nested layouts; Share a Razor Pages layout with integrated components; Additional resources.
Read more >
Using a Code-Behind Approach to Blazor Components
In this article we'll look into when it's helpful to use a code-behind in your Blazor development, how we benefit and what to...
Read more >
Creating a Blazor Server Application with C# and MVVM ...
We will start by creating a new Blazor Server application using the .NET CLI and then we will add a ViewModel to our...
Read more >
A Developer's Guide To Blazor Component Libraries
Learn how to create Blazor components libraries with reusable components, static images, stylesheets etc. and consume them in Blazor Apps.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found