Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // user defined component
- function Factors(props) {
- return (
- <div>
- <h3>factors</h3>
- <ul>
- {getFactors(props.integer).map(function(factor) {
- return <li>{factor}</li>;
- })}
- </ul>
- </div>
- );
- }
- function FactorsA() {
- return <h3>factors</h3>;
- }
- function FactorsB(props) {
- return (
- <ul>
- {getFactors(props.integer).map(function(factor) {
- return <li>{factor}</li>;
- })}
- </ul>
- );
- }
- function FactorsTransformed() {
- return (
- <div>
- <FactorsA />
- <FactorsB />
- </div>
- );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement