the syntax viewof is not recognized in the md file of a observale framework project.
Example code:
```js
viewof selection = Inputs.table(penguins,{required:false})
this throws an error
SyntaxError: Unexpected token (1:7)
Is there a difference in how we use viewof in Observable notebook vs Observable framework?
Cobus
June 5, 2024, 7:14pm
2
Yes, there is! viewof
has always been a strange thing to grasp, so in Framework, we now use view
. You can read more about this in the Framework documentation .
So instead of
viewof selection = Inputs.table(penguins,{required:false})
you would write
const selection = view(Inputs.table(penguins,{required:false}))
1 Like