facebook / react

The library for web and native user interfaces.
https://react.dev
MIT License
228.55k stars 46.78k forks source link

Umbrella: Chopping Block #13413

Open sebmarkbage opened 6 years ago

sebmarkbage commented 6 years ago

I wanted to create a list of things whose existence makes React bigger and more complicated than necessary. This makes them more likely to need to be deprecated and actually removed in a future version. No clue of when this will happen and what the recommended upgrade path will be so don't take this issue as advice that you should move away from them until there's clear upgrade advice. You might make it worse by doing so.

(This has some overlap with https://github.com/facebook/react/issues/9475 but those seem more longer term.)

lifeiscontent commented 5 years ago

@sebmarkbage is there any plan around making refs act as normal props? I don't know all the internals of React but I would imagine it would make refs in react significantly simpler if a ref just acted as a prop.

I imagine an API where if you want a ref, you just do a React.createRef or React.useRef and pass it through to the component vs having to forward the ref.

Is there some internal usage of the ref prop and thats why it's special?

sebmarkbage commented 5 years ago

@lifeiscontent Yes, we're working on this proposal: https://github.com/reactjs/rfcs/pull/107

lifeiscontent commented 5 years ago

@sebmarkbage beautiful. Thank you for the amazing work!