Advertisement
Guest User

Untitled

a guest
Aug 18th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. // user defined component
  2. function Factors(props) {
  3. return (
  4. <div>
  5. <h3>factors</h3>
  6. <ul>
  7. {getFactors(props.integer).map(function(factor) {
  8. return <li>{factor}</li>;
  9. })}
  10. </ul>
  11. </div>
  12. );
  13. }
  14.  
  15. function FactorsA() {
  16. return <h3>factors</h3>;
  17. }
  18.  
  19. function FactorsB(props) {
  20. return (
  21. <ul>
  22. {getFactors(props.integer).map(function(factor) {
  23. return <li>{factor}</li>;
  24. })}
  25. </ul>
  26. );
  27. }
  28.  
  29. function FactorsTransformed() {
  30. return (
  31. <div>
  32. <FactorsA />
  33. <FactorsB />
  34. </div>
  35. );
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement