Is it fine to use the function ( setup ) style? #760
-
Based on https://pinia.esm.dev/introduction.html#basic-example at
I'm using the function / "composition API" style and it works fine for me :) But all the examples in the docs use the object style approach and I would like to know if one approach is favored. The parts "even" and "more advanced use cases" might be confusing. Is there a benefit in choosing the object ( Options API ) style instead of the function ( Composition API ) style? Thanks in advance |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It's the same as Options API vs Composition API. Use whatever fits your need the best! There are minor differences in:
|
Beta Was this translation helpful? Give feedback.
It's the same as Options API vs Composition API. Use whatever fits your need the best!
There are minor differences in:
hydrate()
vsskipHydration()