Comments (10)
We already use data-rh
by the way
from react-head.
This is now fixed with the latest v3.0.0 release. Please feel free to open a new issue if there's still any problems.
from react-head.
My workaround:
import {createElement} from 'react';
import {HeadTag, Meta} from 'react-head';
const HeadTagSsrOnly = HeadTag;
// remove all client refresh actions.
HeadTagSsrOnly.prototype.componentDidMount = () => {
// nothing
};
HeadTagSsrOnly.prototype.componentWillUnmount = () => {
// nothing
};
export { HeadTagSsrOnly};
Only for MPA without front-ending routing
from react-head.
@tizmagik Seems like there is something wrong with selector builder
from react-head.
Yea, this is the same issue as #16 -- I think we just need to escape the selector
from react-head.
Using content as query isn't quite smart( content can be various and very long)
Maybe react's key mechanism is a good solution
Require key when insert head tags and using it to manipulate dom then
from react-head.
We need some kind of deterministic key that we are aware of/control on both server and client side β open to suggestions!
Edit: Hm, actually maybe we only need to know that react-head places the tags, so maybe we donβt need such a deterministic key?
from react-head.
Seems buildSelector is used to remove SSR tags only,
Maybe just tagging SSR tags for all (like add a "ssr" attribute to the html)
And at client just remove all tags with that attribute
Need to select a name that will not be used by others, like "__ssr__" (kind of python style)
from react-head.
So just delete all document.querySelectorAll('head [data-rh]')
to remove SSR tags?
from react-head.
I think so, that should work. Would you be able to submit a PR and try it out?
from react-head.
Related Issues (20)
- Link canonical cascade HOT 1
- Expose HeadTag? HOT 2
- Question: Does it work without ssr for SEO, on fb and twitter ? HOT 1
- Children prop type missing in HeadProvider HOT 7
- Is this library still maintained? HOT 1
- Suggestion: use renderToStaticMarkup instead of renderToString HOT 4
- Some tags not collected HOT 4
- Invariant failed in HeadTags HOT 9
- Development server not working HOT 2
- does not support ie9? HOT 2
- Proposal: headTagsToElement(headTags) HOT 1
- Element.remove() not supported in IE HOT 3
- Document usage with SSR streaming HOT 3
- TypeScript support HOT 3
- react-head supports meta update on lazy load HOT 3
- itemProp support on <Meta /> HOT 1
- canonical link is repeated HOT 1
- Title component doesn't override default <title> tag provided via HTML template HOT 10
- Entities in computed attribute values? Suggested approach? HOT 5
- RFC: Managing tags without extra markup HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-head.