Closed klarkc closed 2 years ago
From the top of my head
```hs {- main.purs -} module Main where import Prelude import PureVue (VNodeChild, mount) import PureVue (createAppRender) as createApp import PureVue.HTML as H data Data = Data { message: String } render :: Data -> VNodeChild render Data { message } = H.div message main :: Effect Unit main = do app <- createApp (Data "Hello World") render discard $ mount app "#app" ```
```html
```Using template instead of render function:
```purs {- main.purs -} module Main where import Prelude import PureVue (createApp, mount) data Data = Data { message: String } main :: Effect Unit main = do let data = Data "Hello World" template = "
```html
```We decided to go with https://github.com/klarkc/pure-vue/issues/1
I'm still considering this composition api approach, I'm seeing that composition api hides a lot of side-effects
Originally posted by @klarkc in https://github.com/klarkc/pure-vue/issues/1#issuecomment-1062332734
We'll try to create a simple side-effect-free component with a render function instead of setup hook (which is not side-effect free)