What is the best place for static data? #8749
Answered
by
chenxch
abitrolly
asked this question in
Help/Questions
Replies: 1 comment 7 replies
-
I think this should depend on whether your data needs to be used directly in the template. If you can directly consider returning this static data through a calculated property or function introduction, it is also possible in data, but you need to perform a freezing operation on it, such as |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I've heard it is a bad practice to put static JSON for lookups into
data:
, because Vue will make this data reactive. Where to place such data then?Beta Was this translation helpful? Give feedback.
All reactions