react-dart icon indicating copy to clipboard operation
react-dart copied to clipboard

ReactComponent instead of "Component2" ?

Open ghost opened this issue 4 years ago • 2 comments

I discovered this package recently and have been enjoying it a lot. One thing that I think doesn't make sense to me is the name of the class "Component2". Won't "ReactComponent" be a more descriptive name for it? Component2 just feels arbitrary

ghost avatar Mar 03 '21 21:03 ghost

We used to have a class called Component that was deprecated. Component2 is just the next evolution of that. It changed the underlying props/state from dart maps to "js-backed" maps, this made it possible to use the react devtools! It also added support for lots of the stuff in React 16. The underlying props/state change was a breaking change hence the 2.

kealjones-wk avatar May 26 '23 22:05 kealjones-wk