How to Implement Smooth Scrolling for WebView on iOS Using Client-Side JS

We need to implement a native-like scroll for the iOS webview, all scrolling views. This type of scroll is known as momentum or inertial scroll.

Investigate all possible ways to do this without changing the React Native configuration.

External libraries

❌ smooth-scrollbar | npm | Memory expensive, can be attached only per-element

❌ rolly.js | Docs | Memory expensive, can be attached only per-element

❌ momentumfx | Docs | Doesn't work at all

Custom solutions

Link | Applied per element, investigation needed if It can be appied to all
?Custom solution based on momentumfx | Docs | can be used to write adjusted version of a scroller hook

CSS rules

scroll-behaviour | Docs

-webkit-overflow-scrolling: touch; | Docs

Known solution: React Native webview config

Deceleration Rate param | Docs

Final results

It's not practical to achieve smooth inertial scrolling on iOS without extensive work on a new library that covers all possible scenarios. It's better and more efficient to use the WebView API and set the appropriate deceleration rate value instead.