document `getSSRProps` for directives
See original GitHub issueI believe the documentation is missing something or there is a bug about getSSRProps: https://v3.nuxtjs.org/guide/directory-structure/plugins/#vue-directives
When I copy the content and paste it into /plugins/focus.ts
or /plugins/focus.client.ts
(in a project without any directives just with pages) I get the same getSSRProps missing error as anyone above - but the besides the error, it seems to work on most mounted elements.
(To check, the .focus()
changed to .style.color = 'green'
did its job)
_Originally posted by @BananaAcid in https://github.com/nuxt/framework/issues/3154#issuecomment-1213340079_
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:10 (2 by maintainers)
Top Results From Across the Web
Vue SSR Directives - Quasar Framework
Declaring a Vue directive (or directly importing it) in a .vue SFC file is ... Vue directives to also specify a getSSRProps() method...
Read more >Server-Side Rendering (SSR) - Vue.js
Unlike a fully static SPA that can be deployed on any static file server, ... add to the rendered element), you can use...
Read more >Document directive - MDN Web Docs Glossary: Definitions of ...
CSP document directives are used in a Content-Security-Policy header and govern the properties of a document or worker environment to which ...
Read more >How to use FunctionDirective in Vue3? - Stack Overflow
There 2 ways to declare a Vue directive - using an object syntax, where you declare all the hooks that your directive is...
Read more >Directives Help — DOE Directives, Guidance, and Delegations
Enter dates to limit your search to a specific time period. Select whether you want to search for documents with a contractor requirements...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Oh wauw. Just realized I posted my finding on my Passionate People account. I will repost this issue on the Vue repo. Thanks!
Turning it into a composable made it works:
and in a
<script>
tag inside a vue component:and in the template:
It solves my problem in Vue 3 with
<script setup>
. I don’t know how to solve it for Vue 2.7 though.