Syntax similar to JSX
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- javascript, python, react
Línea de trabajo
Start by reading the linked tagstr transpiler issue and the example implementation in tagstr/examples/htmldom.py. Clarify whether the work targets the interim transpiler, the tag string PEP, or both, then define the html tag function's expected behavior from the JSX examples. Done means an agreed implementation path with working transpiler support and an html tag usable by the shown example.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Current Situation
ReactJS has a method of HTML templating called JSX. We currently do not have an equivalent. We should create a Python-based JSX equivalent that operates similarly to how it is used in ReactJS (Javascript).
The key difference here is we will not use a dedicated file extension (such as .psx) in order to not break existing toolchains. Instead, we will rely on the tag string PEP that adds template literals to Python. Here is an example of the tag string syntax:
from reactpy import html
button_style = {"font_style": "bold"}
button_text = "Click me!"
view = html(t"<button on_click={lambda event: ...} style={button_text}>{button_text}</button>")
While we wait for the tag string PEP to be merged, we could potentially use an interim transpiler to use a similar syntax. The interim transpiler syntax would look something like this:
from reactpy import html
button_style = {"font_style": "bold"}
button_text = "Click me!"
view = html @ f"<button on_click={lambda event: ...} style={button_text}>{button_text}</button>"
Proposed Actions
Aid in the development of this proposed transpiler and then develop an html tag function. An initial implementation of an html tag can be found here.
News: There is now a VSCode Extension to add syntax highlighting for inline HTML. (and a second one)
- Lenguaje dominante
- Python
- Estrellas
- 8.1k
- Forks
- 332
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de reactive-python/reactpy
-
Outdated GIF in Docs Abiertopriority-3-low type-docs
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
reactive-python/reactpy#1034 ·
-
priority-2-moderate type-revision
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
reactive-python/reactpy#1319 ·
-
priority-1-high
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
reactive-python/reactpy#1277 ·
-
priority-3-low
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
reactive-python/reactpy#1273 · 1 reacción ·
-
priority-2-moderate
Dificultad 5/5 Más de una semana Aptitud para principiantes 30/100
reactive-python/reactpy#1272 · 2 reacciones ·
Todos los issues de reactive-python/reactpy
Issues similares
-
link-check link-check:sphinx-theme
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
qgis/QGIS-Documentation#11275 ·
-
bug priority:normal ready-for-dev
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
OpenHands/extensions#626 · 1 comentario ·
-
Change observation tooltip text Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
CSCfi/sd-search-api#39 ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100