1

The documentation around Microsoft's recently released ReactXP doesn't have much information about the RX.Component class at the moment.

Here's an example from the documentation:

class HelloWorld extends RX.Component<void, void> {
    render() {
        return <RX.Text>Hello World</RX.Text>;
    }
}
  1. What are the features offered by RX.Component over React.Component?
  2. How does it influence the life-cycle of the base Component class?

This is an important consideration for me because best practices for React components typically encourage composition over inheritance, except for very basic scenarios like PureComponent. Would the features provided by RX.Component justify the inheritance?

hazardous
  • 10,627
  • 2
  • 40
  • 52

1 Answers1

6

I believe it's the same:

https://github.com/Microsoft/reactxp/blob/master/src/web/ReactXP.ts#L131

Maybe they just want to make everything under the RX namespace so you only need to import RX = require('reactxp');

CodinCat
  • 15,530
  • 5
  • 49
  • 60