-
Notifications
You must be signed in to change notification settings - Fork 94
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
feat(useFavicon): port useFavicon
from react-use
#386
Conversation
Change from `document.getElementsByTagName('head')` to `document.head.`
@septs If the pull request is merged/accepted, could you please add the |
Sorry, i am not a maintainer |
# Conflicts: # src/index.ts
…ve example This commit adds remaining things that are required for adding this hook to the library. Missing documentation is added, example is improved, ESLint warnings fixed and import style fixed. re react-hookz#33
Codecov Report
@@ Coverage Diff @@
## master #386 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 61 62 +1
Lines 1065 1075 +10
Branches 184 186 +2
=========================================
+ Hits 1065 1075 +10
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
I noticed that this PR is quite old, so I figured it was time to give it some love. I went over this PR and fixed things that needed to be fixed in order for this to be merged (added missing documentation, improved example, refactored code a little). Let's review this and get this one merged! The biggest code change I made is changing the |
Ah, about this one. i'm still making my mind, but tipping to decision not to implement hooks that modify |
Just had a look at react-helmet-async, and fair enough, there seems to be more to the SSR side than I imagined. Could you write your thoughts like this to the pull requests in the future? That way we would all be on the same page and unnecessary work could be avoided. Should we close this one then and add a mention to the docs that this one will not be implemented? |
What are going to do with |
|
Sounds good! |
Removing this hook since it has been decided that hooks which modify contents of the head element should not be included in this library. BREAKING CHANGE: useDocumentTitle has been removed. re #386
* docs(migrating-from-react-use): Add mention about not implementing useFavicon Hooks that modify contents of the head element will not be implemented, as discussed in #386. closes #386 * docs(migrating-from-react-use): Fix typos and spellling errors * feat(useDocumentTitle): Remove useDocumentTitle Removing this hook since it has been decided that hooks which modify contents of the head element should not be included in this library. BREAKING CHANGE: useDocumentTitle has been removed. re #386
🎉 This issue has been resolved in version 18.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
What new hook does?
Checklist
react-use
#33