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

Does not showcase as Universal / Isomorphic #62

Closed
iDVB opened this issue Jul 29, 2015 · 7 comments
Closed

Does not showcase as Universal / Isomorphic #62

iDVB opened this issue Jul 29, 2015 · 7 comments

Comments

@iDVB
Copy link

iDVB commented Jul 29, 2015

Just a few issues noticed in the example when JS is disabled:

  • "Clicked Me # Times" button stuck at zero.
  • Login form never actually logs you in.
  • Github Fork links on homepage rely on JS and thus break

I know some of these are picky, however, when looking to pitch a boilerplate/methodology's use, being able to point to something without immediate flaw is rather imperative.

@erikras
Copy link
Owner

erikras commented Jul 29, 2015

If you're looking for a project that works with javascript disabled, you'll need to look elsewhere.

Universal ≠ works with javascript disabled. All the UI is based in React, which uses javascript to bind event handlers. Universal = the initial render happens on the server, and subsequent page rendering happen on the client.

I'm a little surprised that you need to pitch a framework that works without javascript in 2015.

@iDVB
Copy link
Author

iDVB commented Jul 29, 2015

Thanks for clarification @erikras . I wasn't aware of the distinction but it does make sense. Seems like at the very least being able to render first load and have routing still working should tackle the SEO issue.

Believe me, it's something I'd rather not have to worry about though. It's a topic similar to "Should sites work in IE8 in 2015". I happen to work an industry that is hamstrung a fair deal around legacy browser support as well as strict progressive enhancement / unobtrusive js support requirements.

What this means to our developers, is that if there is a form that can be submitted without a refresh, then it should also be able to be submitted with a refresh and JS disabled. At the very least, that there is a less immersive experience when done.

Ex: A good example of this would be a search bar in the site's nav, where the form's action attr is the same for WITH and WITHOUT-JS scenarios.

WITH JS: complex typeahead search when JS is enabled...
JS Enabled

WITHOUT JS a search results page with the same results.
JS Disabled

Definitely interested in yours or anyone else's thoughts on this. Also interested in articles of solutions to this problem.

@erikras
Copy link
Owner

erikras commented Jul 29, 2015

It seems like you could still use react events and redux for the majority of users that have js enabled, but for your forms that you need to work without js, it should just be a matter of actually creating all the server endpoints, e.g. /submitProductSearch (to plug into your <form action="">'s) to fetch the data, populate the redux store and then use the regular server side rendering (which uses react). So enabling non-js stuff with a project like this is not quite as ridiculous a possibility as I thought at first.

@iDVB
Copy link
Author

iDVB commented Jul 29, 2015

Ya, seems like there should be some way.

Another example would be a simple ajax form submission with client/server validation. The form should still submit with or without js, and only the clientside validation would be lost, however the serverside validation would still happen and when the page comes back from the server, the server has already pre-rendered the form with exact same error msgs and styles as the clientside would have but without the refresh.

@erikras
Copy link
Owner

erikras commented Jul 29, 2015

Yep. I've built apps with that requirement before, and there are plenty of considerations like that. At least now, with node, the code, like validation and rendering can be shared on both the client and server.

@erikras
Copy link
Owner

erikras commented Jul 29, 2015

I'm going to close this, since I think I've answered your question and concerns. Working with non-js clients is not a priority of this project.

@clayrisser
Copy link

Does anyone have any examples of this?

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

No branches or pull requests

3 participants