V
V
Vladislav2021-04-15 17:24:23
React
Vladislav, 2021-04-15 17:24:23

How to hide/show React content?

Hello!
There is an array of tags, and there is a div in which I map the tags. You need to make it so that on a mobile phone (for example, up to 500px) 1 tag is displayed and the "Show All" button, which will open all the rest that will be hidden, and on tablets and computers, you need to display 2 lines of tags (for the entire width of the screen) and such the same button "Show all", which will also display all the others.
How to do it with React, tell me, or at least give me an idea. Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
vItalIyIrtlach, 2021-04-16
@w13vitaliy

There is a react-responsive library

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question