mirror of
https://github.com/bendtherules/react-props-change.git
synced 2026-08-18 13:53:28 +00:00
24 lines
475 B
JavaScript
24 lines
475 B
JavaScript
import React, { Component } from 'react';
|
|
|
|
import '../section.css';
|
|
|
|
class SectionB extends Component {
|
|
render() {
|
|
return (
|
|
<div className="section" ref={this.props.forwardedRef}>
|
|
<div className="section-text">
|
|
This is section B
|
|
<br />
|
|
{
|
|
this.props.body
|
|
}
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|
|
};
|
|
|
|
export default React.forwardRef((props, ref) => {
|
|
return <SectionB {...props} forwardedRef={ref} />;
|
|
});
|