F
F
ffads livd002021-05-07 11:02:37
React
ffads livd00, 2021-05-07 11:02:37

How to change content based on browser width without page reload?

I need the content to turn into a slider based on the width of the window
but that doesn't work without reloading the page, is there another way?

{window.innerWidth <= 690 ? (<h1>Lorem 1</h1>):(<h1>Lorem 2</h1>)}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alice, 2021-05-07
@livd98

Hold

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question