Hacker News new | ask | show | jobs
by CodeWriter23 856 days ago
I had a Vue question and Google was utterly useless and ChatGPT was giving only answers about the Options (legacy) API. I needed answers for the Composition API. So I told ChatGPT this is syntax for Options <code> and this is syntax for Composition <code> please restrict your answers to Composition examples and it worked.
1 comments

Sounds like you're on the free version of Chat GPT. What was your prompt?
This was after going a few rounds of prompting in a more search-engine style

  for pinia, the composition api syntax is in the form: "defineStore('myStore', () => {})" and options api of the form: "defineStore('myStore', {})", using this definition, please show an example of using pinia and reactive() with the composition api instead of the options api results previously shown. thanks