ReactPy 是一个在 Python 中构建用户界面的库,不需要 Javascript。ReactPy 的界面由组件组成,其外观和行为与 ReactJS 中的组件相似。ReactPy 的设计考虑到了简单性,没有 Web 开发经验的人也可以使用,同时也足够强大,可以随着你的野心而成长。
为了大致了解如何在 ReactPy 中编写应用程序,请看下面这个小小的 "hello world" 应用程序:
from reactpy import component, html, run @component def hello_world(): return html.h1("Hello, World!") run(hello_world)
评论