Using document.querySelector in React? Should I use refs instead? How?

前端 未结 2 605
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-14 02:59

I am building a carousel right now, in React. To scroll to the individual slides I am using document.querySelector like so :

useEffect(() => {
           


        
2条回答
提交回复
热议问题