All Projects → yisar → Doux

yisar / Doux

🦄 Immutable reactivity system, made with ES6 Proxy.

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Doux

Observer Util
Transparent reactivity with 100% language coverage. Made with ❤️ and ES6 Proxies.
Stars: ✭ 905 (+96.74%)
Mutual labels:  reactive-programming, proxy
Fanqiang
翻墙-科学上网
Stars: ✭ 23,428 (+4993.04%)
Mutual labels:  proxy
Proxy Web
proxy-web是用go语言写的,基于snail007/goproxy完成的可视化网页应用
Stars: ✭ 402 (-12.61%)
Mutual labels:  proxy
Shadowsocks Deepin
😎 a powful shadowsocks client for deepin
Stars: ✭ 429 (-6.74%)
Mutual labels:  proxy
Iox
Tool for port forwarding & intranet proxy
Stars: ✭ 411 (-10.65%)
Mutual labels:  proxy
Exodus
network proxy and tunnel (VPN)
Stars: ✭ 432 (-6.09%)
Mutual labels:  proxy
Lpdmvvmkit
LPDMvvmKit - Elegant MVVM framework in Objective-C.
Stars: ✭ 400 (-13.04%)
Mutual labels:  reactive-programming
Proxymanager
🎩✨🌈 OOP Proxy wrappers/utilities - generates and manages proxies of your objects
Stars: ✭ 4,556 (+890.43%)
Mutual labels:  proxy
Mostly Adequate Guide
Mostly adequate guide to FP (in javascript)
Stars: ✭ 21,330 (+4536.96%)
Mutual labels:  reactive-programming
Ssl Proxy
🔒 Simple zero-config SSL reverse proxy with real autogenerated certificates (LetsEncrypt, self-signed, provided)
Stars: ✭ 427 (-7.17%)
Mutual labels:  proxy
Awesome Web Scraping
List of libraries, tools and APIs for web scraping and data processing.
Stars: ✭ 4,510 (+880.43%)
Mutual labels:  proxy
Httpteleport
Transfer 10Gbps http traffic over 1Gbps networks :)
Stars: ✭ 422 (-8.26%)
Mutual labels:  proxy
Mssqlproxy
mssqlproxy is a toolkit aimed to perform lateral movement in restricted environments through a compromised Microsoft SQL Server via socket reuse
Stars: ✭ 433 (-5.87%)
Mutual labels:  proxy
Hivemq Mqtt Client
HiveMQ MQTT Client is an MQTT 5.0 and MQTT 3.1.1 compatible and feature-rich high-performance Java client library with different API flavours and backpressure support
Stars: ✭ 402 (-12.61%)
Mutual labels:  reactive-programming
Ergo
The management of multiple apps running over different ports made easy
Stars: ✭ 452 (-1.74%)
Mutual labels:  proxy
Mobx Vue
🐉 Vue bindings for MobX
Stars: ✭ 401 (-12.83%)
Mutual labels:  reactive-programming
Chromium
Chromium browser with SSL VPN. Use this browser to unblock websites.
Stars: ✭ 4,041 (+778.48%)
Mutual labels:  proxy
Flower
反应式微服务框架Flower
Stars: ✭ 432 (-6.09%)
Mutual labels:  reactive-programming
Betwixt
⚡ Web Debugging Proxy based on Chrome DevTools Network panel.
Stars: ✭ 4,316 (+838.26%)
Mutual labels:  proxy
Disqusjs
💬 Render Disqus comments in Mainland China using Disqus API
Stars: ✭ 455 (-1.09%)
Mutual labels:  proxy
logo

Doux Build Status npm

Immutable reactivity system, made with ES6 Proxy.

Motivation

Hooks API has mental burden and unsolvable defects, this library can solve the following problems:

  • Heavy state and repeated initialization.

In hooks API, Hooks will be initialized repeatedly. If there is a complex state, rendering will be blocked.

const [complexState] = useState(heavyData) // blocked
  • State management and Context problems.

There is a performance problem with context. All children of Context need to be rerendered.

<Provider>
  {this.props.children} {/* All children will be rerendered. */}
</Provider>

Usage

npm i doux -S
import { observer, observable } from 'doux'
import { render } from 'react-dom'

const data = observable({ count: 0 })

const App = observer(() => (
  <div>
    <div>{data.count}</div>
    <button onClick={() => data.count++}>+</button>
  </div>
))

render(<App />, document.getElementById('root'))

observer

Like memo or lazy, it receives a component and returns a new component.

const App = observer(Component)

observable

Like createContext, It creates a observable object.

const data = observable({ count: 0 })

Dependency collection

An accurate update way, it collects dependency in the initialization phase, establishes the mapping relationship between components and data, and updates the corresponding components when the data changes.

More is here.

Write on copy

The main idea comes from immer.js , when setting, the mutation is applied to the copy, and the copy is taken first when getting, keeping the immutable characteristics, and applying mutations.

License

MIT ©yisar

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].