-
Notifications
You must be signed in to change notification settings - Fork 34
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
3.0 api #41
Comments
This makes sense, however it should warn/throw an error on the server if the prop is not provided in those cases since this means misconfigured server rendering. Maybe can do a
The only valid use case for not having
What are the cases where the |
Ref #41 We provider all of the W3C-compliant head tags, so HeadTag is not necessary as public api anymore.
Ref #41 We provider all of the W3C-compliant head tags, so HeadTag is not necessary as public api anymore.
Ref #41 We provider all of the W3C-compliant head tags, so HeadTag is not necessary as public api anymore.
Ref #41 In this diff I made headTags optional and call invariant with ssr check. For invariant I used `tiny-invariant` package which is quite small and simplified version of `fbjs/lib/invariant`. `babel-plugin-dev-expression` wraps invariant with two cases - throw error with message in development - throw empty error in production `invariant failed` message This allows to strip development only messages and save bytes in user bundle.
Ref #41 In this diff I made headTags optional and call invariant with ssr check. For invariant I used `tiny-invariant` package which is quite small and simplified version of `fbjs/lib/invariant`. `babel-plugin-dev-expression` wraps invariant with two cases - throw error with message in development - throw empty error in production `invariant failed` message This allows to strip development only messages and save bytes in user bundle.
Ref #41 In this diff I made HeadProvider always required to not confuse users why title and meta doesn't work with cascade.
Ref #41 In this diff I made HeadProvider always required to not confuse users why title and meta doesn't work with cascade.
Ref #41 In this diff I made HeadProvider always required to not confuse users why title and meta doesn't work with cascade.
@tizmagik Do we care about ie11 support? We use |
Hmm yea good point, I personally don’t care about IE11 support, but if that’s the only thing that’s breaking support maybe we could address it? What do you think @TrySound ? |
|
@tizmagik I think we are ready for release. |
Awesome, great work @TrySound -- will cut a release as soon as I get a moment |
Just a quick update here, a couple more things I want to get done before a 3.0 release
Will try and get to these ASAP, unless someone else wants to (feel free). |
I was working through upgrading the example app and it struck me that What do you think about renaming it to /* client.js */
import React from 'react';
import ReactHead, { Title, Link, Meta } from 'react-head';
const App = () => (
<ReactHead>
<div className="Home">
<Title>Title of page</Title>
<Link rel="canonical" content="http://jeremygayed.com/" />
<Meta name="example" content="whatever" />
// ...
</div>
</ReactHead>
); |
Nope.
|
The necessity of HeadProvider is defined by invariant. It should not be a problem for user. |
Ok that makes sense, you convinced me to keep the name as-is 😁 I'm having a bit of trouble upgrading the example app but should hopefully get it going soon. I can cut another pre-release if you're itching to use the latest though. Lmk |
Ok example app updated. I think there's issues with react-router and the new React Context API or something, so I opted for |
Yes, this is known problem. Old context providers cannot be inside the new api provider. |
Hm, should be fixed in 16.4. |
We have a couple of breaking changes and I need some brainstorming before the next release.
HeadProvider
has necessaryheadTags
prop which is not necessary for client-only apps so users should specify it as empty arraysHeadProvider
is used to solve cascading tagsHeadTag
is able to work withoutHeadProvider
; will always render tagtag
prop inHeadTag
Questions
headTags
with empty array?HeadProvider
in the tree by throwing an error if context value isnull
?componentDidUpdate
iftag
prop is changed or just removeHeadTag
from public api and provide more aliases?/cc @tizmagik
The text was updated successfully, but these errors were encountered: