V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐关注
Meteor
JSLint - a JavaScript code quality tool
jsFiddle
D3.js
WebStorm
推荐书目
JavaScript 权威指南第 5 版
Closure: The Definitive Guide
mrthanlon

介绍一个 RPC 库/框架 remux

  •  
  •   mrthanlon · Oct 30, 2023 · 1287 views
    This topic created in 913 days ago, the information mentioned may be changed or developed.
    用法类似这样

    ```javascript
    // @remux server
    function serverFunction() {
    console.log('Ouch!')
    }

    // @remux browser
    {
    // put browser code here
    const btn = document.createElement('button')
    btn.innerText = 'Hit me'
    btn.addEventListener('click', () => serverFunction())
    document.body.appendChild(btn)
    }
    ```
    serverFunction 会运行在服务器,Ouch!会在服务器的控制台打出

    最初是受到 remix 启发,另外近期 react 也整了 react server components ,比较像

    https://remuxjs.github.io/docs/zh_CN/master/start/brief.html
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2726 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 13:03 · PVG 21:03 · LAX 06:03 · JFK 09:03
    ♥ Do have faith in what you're doing.