Answer the question
In order to leave comments, you need to log in
How to code with React?
Tell me how it is better to type in react applications today, which library to use for the grid and container, how to find a universal solution that fits any layout? I will be grateful for the answer
Answer the question
In order to leave comments, you need to log in
Most of the projects I have worked on have used https://styled-components.com/ for styling.
const Title = styled.h1`
font-size: 1.5em;
text-align: center;
color: palevioletred;
`;
const Wrapper = styled.section`
padding: 4em;
background: papayawhip;
`;
render(
<Wrapper>
<Title>
Hello World!
</Title>
</Wrapper>
);
import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import Button from '@material-ui/core/Button';
const useStyles = makeStyles({
root: {
background: 'linear-gradient(45deg, #FE6B8B 30%, #FF8E53 90%)',
border: 0,
borderRadius: 3,
boxShadow: '0 3px 5px 2px rgba(255, 105, 135, .3)',
color: 'white',
height: 48,
padding: '0 30px',
},
});
export default function Hook() {
const classes = useStyles();
return <Button className={classes.root}>Hook</Button>;
}
Well, besides the fact that there are various react solutions like material-ui, prime-react, adaptation of react-materializecss, the question arises - why do you need it?
Use styled components, on the container class with grid on css, on nested blocks - styles with grid-row or grid-column: span for the required amount through props
. The front that does not know how to css is KG / AM
Tell me how to make it better today in react applications
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question