CSS
Y-Scroll just to a component
You need to set a fixed height
.component {
height: 100vh;
overflow-y: scroll;
}
.component {
height: 100vh;
overflow-y: scroll;
}
Use "..." when the text exceed component width
.component {
text-overflow: ellipsis;
}
.component {
text-overflow: ellipsis;
}
JS
Ternary If/Else
a = 1
b = 2
c = a == 1 ? a : b
a = 1
b = 2
c = a == 1 ? a : b
without "else"
a = 1
b = 2
c = a == 1 && a
a = 1
b = 2
c = a == 1 && a
just the "else"
a = 1
b = 2
c = a != 1 || b
a = 1
b = 2
c = a != 1 || b
referencies
Rocketseat: https://rocketseat.com.br/