๐—๐—ฆ ๐—ฃ๐—ฟ๐—ผ๐˜…๐˜† ๐—™๐—ผ๐—ฟ ๐——๐—ฎ๐˜๐—ฎ ๐—š๐—ฟ๐—ถ๐—ฑ๐˜€

You handle cell edits. You handle range fills. You handle copy and paste. Too many event handlers make code messy.

Use a JavaScript Proxy. Wrap your data source. The grid reads data through the get trap. The grid writes data through the set trap.

The grid sees a normal object. You control the logic. Your data lives in a Map or a database. The proxy routes the request.

You stop using events for every data change. The row object is an adapter. Centralize your sync logic in one place.

Follow these rules:

The component does not need to own the data flow. Give it a simple object. Make the object smart.

Source: https://dev.to/revolist/javascript-proxy-one-more-way-to-use-it-i-wish-id-known-3-years-ago-40lk