dai-shi/reactive-react-redux

Discussions about proxy-polyfill

Open

#30 opened on Jun 30, 2019

 (1 comment) (1 reaction) (0 assignees)TypeScript (11 forks)github user discovery
help wanted

Repository metrics

Stars
 (501 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

From Twitter: https://twitter.com/dai_shi/status/1145316559461556225

Just revisited: https://github.com/GoogleChrome/proxy-polyfill and https://github.com/reduxjs/react-redux/issues/1179 Two caveats:

  1. It doesn't support has and ownKeys handler.
  2. It doesn't detect accessing new properties. In other words, it would work only if state is only accessed by get with existing properties.

Suppose state = { counter1: 0 }, with proxy-polyfill:

  1. 'counter1' in state can't be trapped.
  2. state.counter2 can't be trapped.

Contributor guide