0

As per title, all I'm trying to achieve is to scroll to some element smoothly by using react-spring animations.

Here I reproduced a snippet with a working example (which when clicking on a section brings you to the following one); Problem is this works only on versions below v6.0.0.

As you can notice on index.js, I added a commented line with a component which contains the exact same logic but converted to v9.1.2 (which doesn't work).

So question is, what part did I convert wrongly? I am probably missing some bits from breaking changes on v6 and I tried looking into the documentation, but they reference to breaking changes for v8 and v9 only, so I'm a bit confused on what I'm missing?

Any answer with a working solution it's perfectly fine, doesn't need to be based on my example - big thank you in advance!

1 Answer 1

1
+50

The version 9.1.2 seems to have some bugs which might be causing this. I found an issue which also states the same problems. (Also, the original issue that found this)

So, according to their releases, version 9.2.0 or upwards would have this issue fixed. I tried 9.2.1 (latest at the time of this answer) in the sandbox provided in the question and it works:

Forked Sandbox (working)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.