Allow server-side components to send messages to client-side components
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
- Área
- full-stack
Línea de trabajo
Start with the callback registration in src/client/packages/@reactpy/client/src/reactpy-vdom.tsx and trace the existing client-to-server event path. The issue still needs an agreed interface for targets or channels before implementation. Done means server-side components can deliver messages to the intended custom client-side component and the contract is documented and tested.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Current Situation
Presently, custom client-side components are able to send events back to the server. However, it is not possible to send events from server-side components to client-side ones.
Proposed Actions
Now that custom JS components have the ability to register callbacks with the client this should be technologically feasible. With that said, while users can listen in on particular message types, there is no concept of a message "target". We could achieve this by having message types of the form server-event:<the-target>, but this seems like a bit of a hack. Perhaps we can allow (require?) a nullable target field for this purpose.
Before diving into all those details though, we need to work out exactly what this interface should look like.
I can imagine having an interface similar to:
@component
def example():
channel = use_channel()
@use_effect
async def delayed_message():
import asyncio
await asyncio.sleep(5)
await channel.send({"my": "message"})
response = await channel.receive()
return custom_js_component({"channel_id": channel.id})
where custom_js_component would then subscribe to messages of the type channel-message and target channel.id.
- 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
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
bancolombia/sentinel#23 ·
-
test md AbiertoCI
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100