HACKER Q&A
📣 nbened

Any SwiftUI-like-styled JavaScript frameworks?


I'm an IOS dev coming to web dev after getting used to Swiftui's awesome HStack, VStack, ZStack, and Spacers.

Finding alignitems and justifycontent a little less intuitive than the stacks and spacers.

Anyone made a similar transition that has any tips? So many JS frameworks yet all of them so far seem to have the same styling of css, some broken css, or some combo of the two.


  👤 christophilus Accepted Answer ✓
My 2 cents is to use Tailwind for CSS and something like React for behavior and UI. Those are two very well documented, popular tools that will be very productive for you once they click. Get the Tailwind plugin for your editor. Oh, and use Typescript.

As for flex and CSS layouts, it can be a pain, but will click eventually.


👤 codingdave
This question feels a bit off - CSS is baked into the browser, not JS frameworks. They all may create the CSS differently, and architect it differently, but at the end of the day CSS is what it is. I'd suggest first learning CSS outside of any frameworks, without JavaScript, just styling HTML. Once you have that understanding, then go see how the frameworks muck with it all.

👤 soueuls
You can try "Chakra UI" it does have HStack, VStack components and is quite intuitive.

You can also use Radix UI