Advertisement
Guest User

Untitled

a guest
Dec 4th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. import React from 'react';
  2. import Photos from './Photos';
  3.  
  4. const Home = React.createClass({
  5. componentDidMount(){
  6. if(this.props.photos.length <= 0){
  7. this.props.loadPhotos(this.props.selectedFilter, 1);
  8. }
  9. },
  10.  
  11. render(){
  12. return (
  13. <div>
  14. <div>
  15. <Photos {...this.props}/>
  16. </div>
  17. </div>
  18. )
  19. }
  20. });
  21.  
  22. export default Home;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement