question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow the use of `ref` in the button component

See original GitHub issue

I am trying to use the Button-component together with the Reach UI library’s AlertDialog and it’s causing some trouble because you can’t use ref with the Button-component. The React documentation suggests that forwardRef can be used to allow this, see: https://reactjs.org/docs/forwarding-refs.html

Potentially, this would also avoid change the Input etc to class components at the same time

react-bulma-components version in use is: 2.1.0

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:21 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
coudscommented, Oct 22, 2018

Hi @MrCreeper1008 Thank for your effort! If you want to can you share the code of your changes I will try to give you a hand (I’m quite full now but I will try to organize my self to be able to work on this)

Thanks!

2reactions
coudscommented, Oct 15, 2018

Hi @MrCreeper1008 I think it should be a one PR, and as you suggest ship it with #97

Read more comments on GitHub >

github_iconTop Results From Across the Web

Refs and the DOM - React
Refs provide a way to access DOM nodes or React elements created in the render method. In the typical React dataflow, props are...
Read more >
Accessing button using ref - javascript - Stack Overflow
Button is a component (does not have ref by default) and button is a primitive element (always has ref by default). If you...
Read more >
Using refs in React functional components (part 1) - useRef + ...
To create a reference to a DOM node in a component we can do it either using the useRef() hook, which for most...
Read more >
A complete guide to React refs - LogRocket Blog
Learn how to use React refs, and why it's important to use them only when React can't handle a function call through its...
Read more >
Everything You Need to Know About Refs in React
var onClick = function() { console.log("Clicked!"); } var button ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found