opened
zhangciwu
username_0
Simplify SSR tag removing, also fix #44
issue
created
TrySound
username_1
I don't think this operation should happen in every `HeadTag`. We can do it once in `HeadProvider` and make it required.
comment
created
zhangciwu
username_0
@username_1 Yeah, let me see it.
comment
created
zhangciwu
username_0
Got a problem, if make `HeadProvider` required at front, there will be two scene:
- `Route` inside `HeadProvider` : `HeadProvider ` will be unaware of page switching, making it's responsibility of checking duplications of tags(title, etc.) fail to work.
- `HeadProvider` inside `Route` : actually not possible, cause `Route` is inside isomorphic code(like `example/src/App.js`), making `HeadProvider` inside it will cause server side `HeadProvider` fail.

So I think just don't use `HeadProvider` at front, removing SSR tags can be done just once by adding some `removedFlag` and check if before real actions. Or just put the removing procedure outside `HeadTag` class declaration, Making it invoking at import time (at front).

How do you think @username_1
comment
created
TrySound
username_1
Closed in favour https://github.com/tizmagik/react-head/pull/55. Thanks for your work.
comment