You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve child->parent communication.
For the time being, child components can send events to parents in 2 ways:
domain event (alway using a external domain class -> heavy)
dom event (cannot be customizable -> bad)
Meanwhile, the first is well-typed and structured, but the second isn't.
We would like Seqflow helps the developer to build CustomEvent so the parent can listen it.
We can write something like
constMyNewDomEvent=createDomEventClass<{foo: string}>('my-dom-event')asyncfunctionChildComponent({},{ component }: Contexts){// something happencomponent.dispatchEvent(newMyNewDomEvent({foo: 'a string'}))}asyncfunctionParentComponent({},{ component }: Contexts){// render ChildComponentconstevents=component.waitEvents(component.domEvent(MyNewDomEvent))forawait(constevofevents){console.log(ev)// ev instanceof MyNewDomEvent}}
With this issue the assignee should:
create and export a function createDomEventClass to help the developer create custom dom event
improve the domEvent method to allow custom dom event
The createDomainEventClass function can help.
The text was updated successfully, but these errors were encountered:
Improve child->parent communication.
For the time being, child components can send events to parents in 2 ways:
Meanwhile, the first is well-typed and structured, but the second isn't.
We would like
Seqflow
helps the developer to buildCustomEvent
so the parent can listen it.We can write something like
With this issue the assignee should:
createDomEventClass
to help the developer create custom dom eventdomEvent
method to allow custom dom eventThe
createDomainEventClass
function can help.The text was updated successfully, but these errors were encountered: