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

Why react-document-meta instead of react-helmet? #22

Open
danilobuerger opened this issue Apr 18, 2016 · 4 comments
Open

Why react-document-meta instead of react-helmet? #22

danilobuerger opened this issue Apr 18, 2016 · 4 comments
Labels

Comments

@danilobuerger
Copy link

See title :-)

@danieljuhl
Copy link
Contributor

danieljuhl commented Apr 18, 2016

Firstly, because it uses another logic for merging, and secondly, because react-document-meta existed before react-helmet 😃

@danilobuerger
Copy link
Author

  1. react-helmet seems to be able to render more attributes, are you planning on expanding those?
  2. would you mind giving a short explanation on how merging differs?

@danieljuhl
Copy link
Contributor

danieljuhl commented Apr 18, 2016

They are actually related... yes, we have a plan and we are working on expanding to allow (almost) any meta tags.

react-helmet gives you the ability to add an array, but that limits the ability to merge nested data, because the code does not know which ones to keep (unchanged), which to change and which to delete. So you actually end up with limited control of the actual meta tags rendered.

We are working on an implementation much like react-helmet, but we are aiming at one, that solves to merging issue.

@danilobuerger
Copy link
Author

What i dislike about react-helmet, and thus looking for alternatives, is that you can't render children with it and you always end up with:

<div>
  <Helmet />
  {children}
</div>

instead of

<Helmet>{children}</Helmet>

which is possible with react-document-meta as far as i skimmed over the code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants