-
Notifications
You must be signed in to change notification settings - Fork 46
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
Component style not updating #34
Comments
@neohed I'll look into trying to reproduce this today with the gatsby starter and see if there's a viable solution or if the component can be updated to accommodate style changes. |
@neohed I was able to reproduce this issue, and it looks like passing the theme name wasn't forcing an update because the I've created a PR that I think should address your issue, if you want to test it out and confirm. |
@tterb I ran a test just now but still see the same issue. I'll test this more later to confirm... |
@neohed Just to clarify, the PR #35 hasn't been merged/published yet so you won't see an changes unless you pull from that branch and use the local package in the gatsby-starter, instead of the published version from npm. |
@tterb I pulled the PR branch into a local repo but didn't know how to import that into my gatsby site. I tried import from the filepath but got compile errors - it seemed like webpack was trying to resolve gatsby dependencies in disqus-react...? What's the best way to test this? |
@neohed The easiest way to test the PR locally would be to pull the branch into a local yarn link ../disqus-react |
@tterb cool symlink worked great - I learned something new! And your fix does work. It updates correctly. What I'm seeing here now seems to be a different bug with my gatsby site where the themeName inside post.js is always "default" even when using "dark" theme... But that's unrelated to disqus-react. I can confirm your fix works. Thanks. |
Fix #34: Modify shouldComponentUpdate condition
Hi,
I'm using disqus-react with this gatsbyjs starter project
The problem is when I use the theme switcher the styles for disqus-react don't update without a page refresh. I tried passing the theme name into react-disqus as a prop to force an update but that didn't work:
<DiscussionEmbed theme={themeName} shortname={disqusShortname} config={disqusConfig} />
Any thoughts on how to force the styles to update?
The text was updated successfully, but these errors were encountered: