Showing links to images using React
Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;
up vote
0
down vote
favorite
I don't feel like I'm taking advantage of React or ES6.
I guess, it looks messy and complicated.
But it does work!
However, I'm just not sure how to make it look better and maybe what I have here is actually fine.
I was hoping for some opinions and any suggestions are appreciated!
Here is an example of what I'm trying to say...
showMedia = (props) =>
return (
<div>
props.photos.length > 0 &&
<div>
props.photos.map((photo) =>
<div>
<a target="_blank"
href= "/api/gaming-profile/char_files/"
+ this.props.profilenId
+ "/files/" + photo.id + "/" + photo.downloadName >
photo.title
</a>
</div>
)
</div>
</div>
);
render()
return (
<div>
<div>Show Media</div>
<div>
this.showMedia(this.state)
</div>
</div>
);
react.js jsx
add a comment |Â
up vote
0
down vote
favorite
I don't feel like I'm taking advantage of React or ES6.
I guess, it looks messy and complicated.
But it does work!
However, I'm just not sure how to make it look better and maybe what I have here is actually fine.
I was hoping for some opinions and any suggestions are appreciated!
Here is an example of what I'm trying to say...
showMedia = (props) =>
return (
<div>
props.photos.length > 0 &&
<div>
props.photos.map((photo) =>
<div>
<a target="_blank"
href= "/api/gaming-profile/char_files/"
+ this.props.profilenId
+ "/files/" + photo.id + "/" + photo.downloadName >
photo.title
</a>
</div>
)
</div>
</div>
);
render()
return (
<div>
<div>Show Media</div>
<div>
this.showMedia(this.state)
</div>
</div>
);
react.js jsx
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I don't feel like I'm taking advantage of React or ES6.
I guess, it looks messy and complicated.
But it does work!
However, I'm just not sure how to make it look better and maybe what I have here is actually fine.
I was hoping for some opinions and any suggestions are appreciated!
Here is an example of what I'm trying to say...
showMedia = (props) =>
return (
<div>
props.photos.length > 0 &&
<div>
props.photos.map((photo) =>
<div>
<a target="_blank"
href= "/api/gaming-profile/char_files/"
+ this.props.profilenId
+ "/files/" + photo.id + "/" + photo.downloadName >
photo.title
</a>
</div>
)
</div>
</div>
);
render()
return (
<div>
<div>Show Media</div>
<div>
this.showMedia(this.state)
</div>
</div>
);
react.js jsx
I don't feel like I'm taking advantage of React or ES6.
I guess, it looks messy and complicated.
But it does work!
However, I'm just not sure how to make it look better and maybe what I have here is actually fine.
I was hoping for some opinions and any suggestions are appreciated!
Here is an example of what I'm trying to say...
showMedia = (props) =>
return (
<div>
props.photos.length > 0 &&
<div>
props.photos.map((photo) =>
<div>
<a target="_blank"
href= "/api/gaming-profile/char_files/"
+ this.props.profilenId
+ "/files/" + photo.id + "/" + photo.downloadName >
photo.title
</a>
</div>
)
</div>
</div>
);
render()
return (
<div>
<div>Show Media</div>
<div>
this.showMedia(this.state)
</div>
</div>
);
react.js jsx
edited May 24 at 16:28
200_success
123k14143399
123k14143399
asked May 24 at 15:04
SkyeBoniwell
1084
1084
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f195093%2fshowing-links-to-images-using-react%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password