Guest User

Untitled

a guest
Jul 18th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. import React from "react";
  2.  
  3. const BlogPage = props => {
  4. const articlesData = [
  5. {
  6. heading: "Heading 1",
  7. subheading: "Subheading 1",
  8. text:
  9. "Taking a mini-retirement can be an eye-opening experience unlike anything you’ve ever done. But if you don’t have a plan and you aren’t funding it adequately, it can become a disaster."
  10. },
  11. {
  12. heading: "Heading 2",
  13. subheading: "Subheading 2",
  14. text: `Taking a mini-retirement can be an eye-opening experience unlike anything you’ve ever done. But if you don’t have a plan and you aren’t funding it adequately, it can become a disaster.`
  15. }
  16. ];
  17. const BlogArticles = props => {
  18. const articles = props.map(function(element) {
  19. <li>{element}</li>;
  20. });
  21. return { articles };
  22. };
  23. return (
  24. <main>
  25. <BlogArticles data={articlesData} {...articlesData} />
  26. </main>
  27. );
  28. };
  29. export default BlogPage;
Add Comment
Please, Sign In to add comment