Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refs are not passed to components #3915

Closed
neutraali opened this issue Mar 23, 2020 · 6 comments
Closed

Refs are not passed to components #3915

neutraali opened this issue Mar 23, 2020 · 6 comments

Comments

@neutraali
Copy link

This is super confusing and feels like the ref -prop isn't being consistently supported through SUIR.

For example:

  1. Input (others?) supports ref Link
  2. Image (others?) does not support ref Link
  3. Ref is being referenced in past issues Link
  4. Ref is removed from docs; moved to Stardust UI || Fluent UI || Whatever UI Link

Let's say I want to:

import Image from 'semantic-ui-react';

let ref = React.useRef(null);
let image = () => <Image ref={ref} />

What is the current style of passing ref? Would be awesome if this was stated somewhere in the SUIR docs in large, bolded letters.

@welcome
Copy link

welcome bot commented Mar 23, 2020

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you've completed all the fields in the issue template so we can best help.

We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

@traverse
Copy link
Contributor

Actually ran into the same problem when trying to implement drag and drop on a table, table rows don't pass refs either.

@layershifter
Copy link
Member

@neutraali you're totally right. This is extremely confusing 🤕

Convergence effort is dead so I will not even try to move it forward, I will revert #3774 to move back docs for Refs 🔙

Current big goal is to get rid of deprecated lifecycle methods (#3919), the next big goal will be solve refs issues and use React.forwardRef.

@brianespinosa
Copy link
Member

@layershifter I think this would also have to be a breaking major version change now that we officially published at 1.0.0 version. @levithomason should we update the docs to mention that since we have a full major version release that we want to stick to semantic versioning while in maintenance?

Also @layershifter I have seen you taking some time to go in and clean up some of the open issues here while also working refactoring for all of the UNSAFE_* methods. Thank you! I am going to make an effort to go through and respond to at least a few open issues every day that are still in the triage bucket.

@brianespinosa
Copy link
Member

Duplicate of #3819

@layershifter
Copy link
Member

FYI: this #4039 PR restores docs for Ref component.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants