I jumped into React recently, so I'm very confused about many things. One of them is about how most of people design UI in React.
Before jumping in, I used Bootstrap to design UI of my website by using pre-made components such as buttons, modal views, navigations, and so on. But, figured out I can't use it anymore in React, but I can use React-Bootstrap
instead. Is React-Bootstrap
still the most popular UI framework in React as well? I'm asking that because I found some other UI frameworks such as Semantic UI or Material UI for React.
Also, I found styled-components
. However, styled-components makes me feel like I need to make every component by myself to use which sounds like taking too long time.
As a very beginner, I'm curious about how people usually work on UI in React?
Which UI is best for ReactJS? UI frameworks like MUI (Material UI), React Bootstrap, React Redux, and Semantic UI are some of the best UIs for ReactJS. Ant Design, Chakra UI, Fluent UI, and Evergreen are also popular UIs.
Material UI is a CCS-in-JS framework that provides ready-to-use components, themes and user interfaces. Styled Components is similar to Material UI, but gives you the ability to build custom CSS components.
Advantages of using Styled-components Below are some of benefits of using styled-components: Eliminates class name bugs: styled-components provide unique class names for your styles, thus eliminating the problems with class names duplications, misspellings, and overlaps.
As seen from the button component example, styled-components allows you to combine CSS and JS in the same file. So, you don't need to create a separate CSS file or keep switching from file to file. This is a huge advantage when creating UI kits because you store all the functionality of the components in one file.
Firstly, There is no clear answer for the problem. In general purpose of styled-components
not mean don't use another ui framework
. And the companies solve the problems which is spesific with their Engineering Team. They have their own architecture though. But the alone programmers are choose some open source solutions.
Well, Some people use together or alone. It's totally about your project or your style of architecture. But still i would say some stuffs for giving point of view.
In the other hand; the UI Frameworks are solve modular problems. An example: You cannot create a modal with only css even styled-components
. you know, you need JavaScript for that.
Semantic-UI
(ReactJS or direct element with the className
),styled-components
instead of css file for spesific part of your project. As e.g: Main
, Aside
, Article
, Post
, TopNavigation
etc.styled-components
, also you can use same components in React Native. (There is no css file support for React Native. You'll need inline
CSS)div
instead of the spesific component, you'll confused after project being bigger. I would recommended you to create for each meaningful Element.styled-components
. That's mean, you'll work only on your JS files instead CSS files, so you can do dynamic things in your components. styled-components
supports almost all CSS features.I prefer
Semantic-UI-React
instead of ReactJS bootstrap frameworks.
Semantic-UI-React
in React Native. You should choose which is another solution or actually make your own your components architecture.Semantic-UI-React
for web/mobile site.variables
.UI Framework
in learning and adaptive process.It's my first answer at Stackoverflow. Hopefully, the answer will help you for your concern.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With