deptagency / dept-engineering-blog-ui

dept-engineering-blog-ui.vercel.app
MIT License
1 stars 3 forks source link

Refactor PostCard #70

Closed cmdea closed 2 years ago

cmdea commented 2 years ago

Issue #51

⚠️ I noticed that the emotion components were rendering duplicate css while working on this PR and I fixed it by adding a wrapper emotion component to _app.tsx. This seems to fix the problem, but if you know better or have encountered this before let me know.

vercel[bot] commented 2 years ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
dept-engineering-blog-ui ✅ Ready (Inspect) Visit Preview May 20, 2022 at 1:19PM (UTC)
cmdea commented 2 years ago

I don't know about emotion specifically, but can you remove your fix and verify that the duplicates still happen in a full build? I've seen issues with Next where hot reloading will apply duplicate styles, but it resolves itself in production.

⚠️ I noticed that the emotion components were rendering duplicate css while working on this PR and I fixed it by adding a wrapper emotion component to _app.tsx. This seems to fix the problem, but if you know better or have encountered this before let me know.

Yes it's also happening on PROD. Screenshot below from today. Here's a link the the emotion issue describing the behavior and the fix I used.

Screen Shot 2022-05-20 at 9 20 09 AM
nring commented 2 years ago

Yes it's also happening on PROD. Screenshot below from today. Here's a link the the emotion issue describing the behavior and the fix I used. Screen Shot 2022-05-20 at 9 20 09 AM

Ahhh okay. This seems like the path of least resistance, and less costly than using <CacheProvider>.