crux
crux copied to clipboard
Provide shell-side Core wrapper boilerplate for Swift, Kotlin and TypeScript
All the example share a very similar implemenetation of the core intereaction, servicing the messaging and keepting the shell-side view model up to date.
At the moment all the implementations couple the serialisation and view model management with other effect handling, but that can be improved.
We should design a common API surface for the Core and provide it as an "SDK" for each supported foreingn language.
A rough list of steps to achieve this:
- [ ] Design a Core API which
- [ ] Has
update
interface serialising the exportedEvent
s - [ ] Surfaces an "observable" (for the given UI toolkit)
ViewModel
instance, which is kept up to date - [ ] Services the
Render
effect and updates the view model - [ ] Allows for plugging in effect handlers for other effects (this probably requires a few POCs)
- [ ] Has
- [ ] include an implementation in the exported foreign language code
- [ ] move the doctor templates and examples to use the API