Just checking if I'm using $refs properly #196
Unanswered
goblinfactory
asked this question in
Q&A
Replies: 0 comments
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.
Uh oh!
There was an error while loading. Please reload this page.
-
I need to add a "close" button onto the standard
feedback.nuedialog that comes with the getting started blog.I am calling a web api, and I created a fun error page, (see screenshot below) if there's any errors.
In order to wire the
@clickhandler on the<button>to close the dialog, i'm having to use$refsas follows; My question is whether the pattern of saving the refs on mounted so that I can use them later is idiomatic and what was intended?I suspect we might want to let Nuejs make this easier for us and I can think of a number of ways we can do that, but at least ...for now, while we dont have that, just wanted to make sure I'm not missing out a simpler (better) way to do this than what I'm doing below that is already supported by NueJs as-is.
This feels like I'm not using Nue properly.
Beta Was this translation helpful? Give feedback.
All reactions