Y
Y
yumakaev2019-12-16 04:35:45
React
yumakaev, 2019-12-16 04:35:45

How to connect your Js to React?

Good evening, I wrote parallax in Js, but I can’t connect it to React ...
How is this done correctly?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Robur, 2019-12-16
@Robur

That's right - write parallax in React.
But if you really want to, then "direct work with dom in react" and "component life cycle".
In short - write a component - a wrapper that renders the markup that your parallax needs, when this component is mounted - get the created dom - element (s), call your code on this block, it works, unmounts - do deinitialization if necessary.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question