Proposal: Make sources and sinks observables
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- api
Research direction
Start at the framework's run function and the existing Sources and Sinks types referenced in the proposal. Review how drivers and components are currently connected, then assess the observable and async migration examples. Done should be a decided API direction with compatibility expectations and validation identified.
Written by the indexing model from the issue text.
Description
Hi,
Working on @cylce/sandbox I ran into a problem, because of multi-threading the sinks from a web worker are returned asynchronously, thus I had to tell my Sandbox driver which expected sinks my component would have.
At CycleConf there was some discussion on MegaDrivers, but I think making Sinks and Sources an observable might be the right way to go.
It would allow a developer to patch a driver while the application is running, and could open up for better debugging tools.
The run function would look like this
run(main, xs.of({
DOM: makeDOMDriver()
}))
And a component would look like this
function Component (sources$: Stream<Sources> ) {
return xs.of({
DOM: xs.of(<div/>)
});
}
This would also make it possible to reroute Components in the DevTool during run-time.
It could mitigate the pain of adding new drivers when a sub-component way down the tree has a certain driver dependency.
The migration for existing code would look as so
run(async(main), xs.of({
DOM: makeDOMDriver()
}))
The async method would mount any synchronously bound component.
- Dominant language
- TypeScript
- Stars
- 10.2k
- Forks
- 423
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cyclejs/cyclejs
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
-
Example build fails Open
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
-
issue is breaking suggestion scope: dom
Difficulty 5/5 Over a week Newbie friendliness 30/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
danielmiessler/LifeOS#2218 ·