Skip to content

Reactivity seem to break when using modules #1850

Answered by mbostock
Ombuweb asked this question in Q&A
Discussion options

You must be logged in to vote

Reactivity is only available as top-level variables in pages. It does not apply within modules, though you can define a generator function in a module, and then use it to declare a reactive top-level variable on a page.

https://observablehq.com/framework/reactivity#top-level-variables

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Ombuweb
Comment options

@mbostock
Comment options

@Ombuweb
Comment options

Answer selected by Ombuweb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants