I'm starting a frontend project with Kotlin/JS and...
# javascript
g
I'm starting a frontend project with Kotlin/JS and the React wrappers and I'm a little confused with how I should be using kotlin-styled-next. I see in the example projects that the FC function is used to make function compents. But it does not seem to support styledDiv. The lower case fc function does support it but it looks like it is considered legacy because it is in the FC.legacy.kt file when I look at the source. What should I be using with kotlin-styled-next?
I figured it out. I should use the FC function and not use styledDiv at all. From the kotlin-styled-next readme this is not very clear.
t
kotlin-emotion
Emotion usage example
Common recomendation -
kotlin-react
+
kotlin-emotion
m
react + mui with the
sx
prop for mui components works also very smoothly 🙂 Simple example:
Copy code
Box {
   sx {
      display = Display.flex
   }
}
t
sx
from MUI and
css
from Emotion use the same builders from
csstype
m
True 👍🏼 Very convenient btw 🙂
g
Thank you both for the info. I will try out emotion.
👍🏼 1