Khan / Khan/aphrodite

Styles are injected after componentDidUpdate.

Open
#76 38 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
5.3k
Forks
187
PR merge metrics
No merged PRs in 30d

Description

I'm trying to use aphrodite in my project. Everything works great so far except one scenario. I have a Tooltip component that measures children dimensions in `componentDidMount` and `componentDidUpdate`. But actual css gets injected after these functions were called. What's worse is that sometimes styles might be already injected, so dom element have unpredictable styling in above functions.

I created an issue on react to discuss how react might help with this problem: https://github.com/facebook/react/pull/6816

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the Tooltip measurement behavior around componentDidMount and componentDidUpdate, then review the linked React discussion about lifecycle timing. Done means the CSS injection timing is deterministic when those callbacks measure the DOM.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.