-
Notifications
You must be signed in to change notification settings - Fork 52
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
handling page title and meta #82
Comments
@bbnnt You're right in that However, I've found great success with leveraging Flux (or similar) to accomplish this. It works this way:
@context("dispatcher")
@resolve("title", ({ dispatcher }) => dispatcher.DocumentActions.setTitle("My Page Title"))
<html>
<head>
<title>${dispatcher.DocumentStore.getTitle()}</title> This works well this way because you never want to render the entire document with React, since analytics, extensions, & other things often modify the DOM out from under you. When I complete the Redux example (#61), I'll be sure to show this as well. Frankly, I don't care for things like |
thanks a lot lot for your reply; too bad react started out with "fake isomorphism" — your component render on the server but… where's the data ? At some point I felt mislead by this buzzword Your piece of work (or the pattern it implies) should be the norm |
That's might be more of a stackoverflow question, but I could not find a good answer to adapt it using this tool.
I was wondering how one would do with react-resolver to handle dynamic page title, or if it had to be handled somewhere else than from within the scope of this tool.
I played around with react-document-title which seemed pretty cool, but so far, server-side, the title results as undefined.
Should the server rendering be moved to a component (as opposed to the examples, where the html base is located in server.js) ? In that case, how to handle the returned payload ?
The text was updated successfully, but these errors were encountered: