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
-
I need to add a "close" button onto the standard
feedback.nue
dialog 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
@click
handler on the<button>
to close the dialog, i'm having to use$refs
as 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