POC: feat: stable style for AtomLabelEditForm#75
Conversation
AtomLabelEditFormAtomLabelEditForm
|
By reading https://react.dev/reference/react/useInsertionEffect, we should not use |
Deploying react-ocl with
|
| Latest commit: |
ab54cff
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://244e744b.react-ocl.pages.dev |
| Branch Preview URL: | https://72-ensure-stable-styling-acc.react-ocl.pages.dev |
|
We are not a CSS-in-JS lib, but what is done here is similar to css-in-js. But if we want to have this kind of feature (on-demand styling, optional reset) the best we can do is to integrate
|
|
I wonder if https://react.dev/reference/react-dom/components/style isn't actually the simple answer to just inject css at the level of the component render. |
|
I will give it a try |
* improve form css to looks nearly identical with and without reset
|
Ok, So I finally moved I tweaked And I added a |
|
So, @targos do you prefer we merge as-is this POC, or do you prefer we use |
|
I discussed with Luc and if we are ok with using |
|
With
To conclude:
|
|
Let's use And it's not so large after all: https://bundlephobia.com/package/@emotion/styled@11.14.1 |
|
Done, But I wonder if I should use |
|
I think dependencies is good. |
* move dependencies above devDependencies Refs: #75 (comment) Refs: #75 (comment)
<OclReset>useCSSinternal util to manage dynamic cssRefs: #72
Pro:
Cons: