question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Styles gone after revisting page

See original GitHub issue

So I’m using react-tooltip for a register form. When I redirect to the login page, then redirect back to the register page with the register form, all the styles are gone from the tooltips. The text and css transitions still function, but the background and text color is gone.

I rebuild the tooltip bindings in useEffect with the following: useEffect(() => { ReactTooltip.rebuild(); });

Anyone having similar problems?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:5

github_iconTop GitHub Comments

4reactions
s-ashwinkumarcommented, Jul 6, 2020

@faahim Had the same issue.To circumvent it for now, pass a ‘uuid’ prop to the styling component and it will not generate one on its own on re-render. Haven’t seen anything break because of this fix… yet. <ReactTooltip uuid="<some-uuid-here>" />

@Joseppi83 thanks for raising this. Helped me zero in on the temp fix.

PS : Found the source issue which allows us to do the aforementioned fix - https://github.com/wwayne/react-tooltip/issues/580 which is what led to adding the use of a prop uuid.

1reaction
faahimcommented, Jul 6, 2020

@s-ashwinkumar Woo, thanks so much for all those info! When I saw it has mismatched hashes, I felt like, gosh, if it generates new ones every time, and it can go wrong, then it will go wrong at least some of the time. I know it can be reliable (UUID looks like a solid fix here), but my OCD brain wouldn’t give me the peace of mind. 😅

I’m overriding the stylings with a custom class name for now. But will use uuid approach next time.

Thanks a ton!

Read more comments on GitHub >

github_iconTop Results From Across the Web

CSS-in-JS theming lost on page reload (prod-only) #10988
In my case, gatsby-plugin-minify was making this problem, which led the production build to reload all styles after a page was loaded completely ......
Read more >
CSS styles disappear after refresh in React app - Stack Overflow
When you visit /example/page/ you're trying to request /example/page/styles.css , but as that doesn't exist, your server falls back to index.
Read more >
Revisiting :Visited - Joel Califa
The web has come a long way since those early days. We've gone through cycles of aesthetic trends and have become so much...
Read more >
visited - CSS: Cascading Style Sheets - MDN Web Docs
The :visited CSS pseudo-class applies once the link has been visited by the user. For privacy reasons, the styles that can be modified...
Read more >
visited - CSS-Tricks
Revisiting :visited, from Joel Califa, shows an example of using localstorage to style visited, in-domain links. Hacking :visited, from Una ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found