V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
ChrisFreeMan
V2EX  ›  Python

该来的还是来了, Python 版 react

  •  
  •   ChrisFreeMan · 263 天前 · 2471 次点击
    这是一个创建于 263 天前的主题,其中的信息可能已经有所发展或是发生改变。

    reactpy.dev

    from reactpy import component, html, run
    
    
    @component
    def App():
        return html.h1("Hello, world!")
    
    
    run(App)
    
    12 条回复    2023-08-12 16:28:39 +08:00
    naminokoe
        1
    naminokoe  
       263 天前 via iPhone   ❤️ 1
    有没有 python 版的 vue
    NessajCN
        2
    NessajCN  
       263 天前
    支持 jsx 吗.....
    fgwmlhdkkkw
        3
    fgwmlhdkkkw  
       263 天前   ❤️ 2
    这下是真的需要游标卡尺了!🥰
    cherbim
        4
    cherbim  
       263 天前
    名字味不对,不应该叫 pyreact 么?
    ChrisFreeMan
        5
    ChrisFreeMan  
    OP
       263 天前
    @NessajCN 真要支持也应该叫 pyx ( PythonXML )吧, 实际上 jsx 也是最终翻译成 js 来执行的,只有有人愿意去开发这个编译工具当然也可以支持。
    ChrisFreeMan
        6
    ChrisFreeMan  
    OP
       263 天前
    @naminokoe 可能 react 的理念更合适一些吧。。。
    NessajCN
        7
    NessajCN  
       263 天前 via Android
    @ChrisFreeMan 你在 python 里也得翻译成 js 啊…浏览器又不认识 python 脚本
    ChrisFreeMan
        8
    ChrisFreeMan  
    OP
       263 天前
    ChrisFreeMan
        9
    ChrisFreeMan  
    OP
       263 天前
    @NessajCN 好了好了,我知道了它也是 js 写的,不要较真
    MrHyde
        10
    MrHyde  
       262 天前 via iPhone
    @cherbim reactjs vs reactpy
    zcf0508
        11
    zcf0508  
       262 天前   ❤️ 1
    RuiCBai
        12
    RuiCBai  
       262 天前 via Android
    https://github.com/reactive-python/reactpy/discussions/996

    还想试试的,发现没法在 vercel 上 deploy
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2547 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 13:01 · PVG 21:01 · LAX 06:01 · JFK 09:01
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.