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

replace react-document-meta library for setting title #1700

Closed
jcoyne opened this issue Nov 7, 2019 · 5 comments
Closed

replace react-document-meta library for setting title #1700

jcoyne opened this issue Nov 7, 2019 · 5 comments
Assignees
Labels
debt Technical debt, either refactor or remove question Further information is requested

Comments

@jcoyne
Copy link
Contributor

jcoyne commented Nov 7, 2019

react-document-meta is used for setting the Title on the page. However it hasn't had a release for a few years and raises deprecation warnings with our currrent react.

@jcoyne jcoyne added the debt Technical debt, either refactor or remove label Nov 7, 2019
@justinlittman justinlittman changed the title react-document-meta uses deprecated syntax replace react-document-meta library for setting title Nov 11, 2019
@jgreben
Copy link
Contributor

jgreben commented Nov 11, 2019

This might be a good replacement: https://www.npmjs.com/package/react-meta-tags. But where can I see the deprecation warning that Sinopia raises? I do not see it in the console, in the dev log, or in the circle build...

@jgreben jgreben added the question Further information is requested label Nov 11, 2019
@jcoyne
Copy link
Contributor Author

jcoyne commented Nov 12, 2019

@jgreben it's a message about using unsupported lifecycle callbacks in the JS console:

Warning: componentWillMount has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.

* Move code with side effects to componentDidMount, and set initial state in the constructor.
* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.

Please update the following components: SideEffect(DocumentMeta) react-dom.development.js:12338

@jcoyne
Copy link
Contributor Author

jcoyne commented Nov 12, 2019

react-helmet is a another possible replacement: https://github.com/nfl/react-helmet

@jgreben
Copy link
Contributor

jgreben commented Nov 12, 2019

Thanks @jcoyne. I looked into each of the repos a bit further, and implemented each:

Helmet:

RMT:

  • more recent releases; last release less than 1 year ago
  • developed as class components
  • maintained by just a single person with 4 other contributors
  • no tests...
  • Does not have the componentWillMount issue

What do all think?

@jgreben jgreben self-assigned this Nov 12, 2019
@jgreben
Copy link
Contributor

jgreben commented Nov 12, 2019

@jgreben jgreben closed this as completed Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debt Technical debt, either refactor or remove question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants