Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

routing: add a note regarding path use and dumb http servers #64

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ydirson
Copy link

@ydirson ydirson commented Feb 11, 2024

No description provided.

@ydirson
Copy link
Author

ydirson commented Feb 11, 2024

Note this can be seen as something of a first draft:

  • it can be also related to CSR deployment, though the intent is to make the point obvious to readers of the Routing page
  • the specific constraints on web hosting should likely be clarified by someone in-the-know, I was not able to find any details

@benwis
Copy link
Contributor

benwis commented Feb 13, 2024

Note this can be seen as something of a first draft:

* it can be also related to CSR deployment, though the intent is to make the point obvious to readers of the Routing page

* the specific constraints on web hosting should likely be clarified by someone in-the-know, I was not able to find any details

Wouldn't you be able to provide state via query params if you wanted to?

@ydirson
Copy link
Author

ydirson commented Feb 13, 2024

Wouldn't you be able to provide state via query params if you wanted to?

Sure, and that is surely worth mentioning as an alternative.

Also @diversable mentioned an article that can be used to enrich the CSR hosting options.

@benwis
Copy link
Contributor

benwis commented Feb 14, 2024

Wouldn't you be able to provide state via query params if you wanted to?

Sure, and that is surely worth mentioning as an alternative.

Also @diversable mentioned an article that can be used to enrich the CSR hosting options.

An article on using nginx for angular?

@ydirson
Copy link
Author

ydirson commented Feb 14, 2024

An article on using nginx for angular?

The interesting part for us is how to configure nginx to serve an app that uses path for routing.

@gbj
Copy link
Contributor

gbj commented Feb 16, 2024

I have not used GitHub Pages or the other services described — are they incompatible with History API-based client-side routing? The typical pattern in single-page apps like this (SPAs) is that you rewrite /* to /index.html, or /my-app/* to /my-app/index.html (and set the router base prop on Router and Routes to my-app).

I have heard occasional requests for hash-based routing related to GitHub Pages, but no one has ever been interested in making a PR to add it when I've asked. I'm very open to it.

If that's the case (that they only support hash-based client-side routing) then it's not so much that you can't use the router to drive state as they you can't use the router.

I don't think adding these paragraphs in this location is the right way to address this. I'm fine with a short note saying that the router isn't compatible with the hash-based routing that these services require, but that we're open to contributions to add it, but this addition is nearly as long as this whole introduction to the router section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants