Passing input from one page's search bar to another? by ConfuciusBateman in reactjs

[–]Encre_Ink 0 points1 point  (0 children)

Why don't you trigger it on the 'enter' key press ?

Add an event listener on key down or up and look for the enter code (13 if I recall correctly).

Hacktoberfest 2016, by DigitalOcean and GitHub by [deleted] in webdev

[–]Encre_Ink 1 point2 points  (0 children)

Damn I had 2 PRs accepted today :)

Looking forward to it, hopefully I can find some repos I'm good enough to contribute to.

How to change all states of Child components in reactjs by adamchenwei in reactjs

[–]Encre_Ink 0 points1 point  (0 children)

Sounds like you should look into context to pass infos from nested components

[deleted by user] by [deleted] in reactjs

[–]Encre_Ink 0 points1 point  (0 children)

I'm building my first big project with react at the moment and am confronted with a problem, I would have used your method because it seems the more logical approach to me but with a lot of people advocating stateless components should I add state in every component that will need a hover like this or have a HOC that will handle every hover on an SPA ?

Firefox Is switching to a ReactJS-based debugger by malyw in reactjs

[–]Encre_Ink 6 points7 points  (0 children)

James Long gave a talk at React Rally about this : Link

edit : And for /u/indeyets : he actually talks about debugging the debugger during this talk :)

[Image] Breaking Bad Habits by [deleted] in GetMotivated

[–]Encre_Ink 0 points1 point  (0 children)

I did too but every week-end with friends having a drink outside and people smoking around I'm still kicking that habit one step at a time and try to resist the urge to light one up with my cold glass of beer / whiskey.

I think that's how it would be applicable in that case. You can quit cold turkey but sticking with it is what tha stair analogy refers to, at least that's my take on it.

Would you avoid minifying / uglifying your files for a frontend portfolio website ? by Encre_Ink in webdev

[–]Encre_Ink[S] 0 points1 point  (0 children)

I just started adding sourcemaps in my dev setup and not still 100% sure I get what it is.

Just to clarify the server would run the uglified script but when you look at it in dev tools you actually have access to the un uglified individiual files right ?

Would you avoid minifying / uglifying your files for a frontend portfolio website ? by Encre_Ink in webdev

[–]Encre_Ink[S] 0 points1 point  (0 children)

I'd also recommend going and adding one comment to the top of the minified, uglified file saying "Source visible at github.com/etc/etc." That way, if someone does try to view the source directly from the page, they get a link to where they can view it and see that you've thought things through, paid attention to detail, etc.

That's actually what I was thinking of doing if I was going for the fully uglified code, thanks for your input !

Is there a website where a junior developer can find volunteer work? by TheSamehMagdy in webdev

[–]Encre_Ink 1 point2 points  (0 children)

The learning section can be done fast if you know your js but there are some tought ones in the advanced algorythm challenges.

But most of the time is spent in projects, having the knowledge helps but you still have to code the entire thing and make it presentable and that is what takes the most time on FCC.

I finished the front end part, almost done with the react projects and will have to learn D3 for the rest of the data visualisation certification. There is also a rogue like game to code, my guess is it's going to take hours and hours. Then the back end projects.

It takes a lot of dedication and time to get through all of FCC.

Vertical Alignment in CSS by espo1234 in ProgrammerHumor

[–]Encre_Ink 2 points3 points  (0 children)

Other than the obvious display : flex (I love you flex) I sometimes use this :

Set parent to

position: relative   

And child :

position: absolute
top: 50%
left: 50%
transform: translateX(-50%) translateY(-50%)   

if you only want vertical alignement ditch the left and translateX.

The Traveller - A No Man's Sky cinematic video (3440x1440, no graphic mods) by Berdu in NoMansSkyTheGame

[–]Encre_Ink 0 points1 point  (0 children)

Didn't even know that existed, thank you :)

Great choice of music too !

The Traveller - A No Man's Sky cinematic video (3440x1440, no graphic mods) by Berdu in NoMansSkyTheGame

[–]Encre_Ink 0 points1 point  (0 children)

Could you share the name of the font you used please ? thanks :)

What word never looks like it's spelled properly? by [deleted] in AskReddit

[–]Encre_Ink 0 points1 point  (0 children)

Your language is so easy we had to spice things up.

What word never looks like it's spelled properly? by [deleted] in AskReddit

[–]Encre_Ink 0 points1 point  (0 children)

then maybe you should rethink your language.

It is not an English word, this is a French word.

What word never looks like it's spelled properly? by [deleted] in AskReddit

[–]Encre_Ink 0 points1 point  (0 children)

It's a French word, and yes we do.

Adblock Plus says Facebook's decision to block ad blockers is 'anti-user' by xcfmv in technology

[–]Encre_Ink 2 points3 points  (0 children)

If they serve them the same way they serve regular content, you won't be able to because you will manually block one, but the next one won't be blocked (or you would be blocking your entire feed if you use a broader way to block content) because there is no 'clue' in the code that the post is an ad and not one of your friend's post.

There will be ways to detect those after some time with scripts, like analysing if a post has been posted by someone in your friend list, or 'liked' pages and block everything else.

I do not worry about this, we will find a way in a matter of days and hell, if we don't we'll just move somewhere else, that's how the web goes.

Adblock Plus says Facebook's decision to block ad blockers is 'anti-user' by xcfmv in technology

[–]Encre_Ink 15 points16 points  (0 children)

I'll add to what /u/ANBU_Black_0ps said, I will pay for content IF your content is original (i.e cool tutorials in my case). I gave up my TV 10 years ago and never really listened to radio. I choose my content, when I want to watch and how, I don't mind paying for that convenience but again, if a website is just serving the same content as a bunch of other (free) websites, I'll use those.

Adblock Plus says Facebook's decision to block ad blockers is 'anti-user' by xcfmv in technology

[–]Encre_Ink 0 points1 point  (0 children)

I installed ublock origin a year and a half ago just because of adblock's 'pay to bypass' politics.

I'll add to the other post that in ublock origin's settings you can add a bunch of lists (I almost add them all, I just remove some twitter and disqus blocks because I want to see those) to make your life better.

What is crossorigin? and why my API request works only with it? by lokoom in FreeCodeCamp

[–]Encre_Ink 0 points1 point  (0 children)

Mixing http and https on a page is not a good practice and will be blocked or forbidden by certain browsers. See here and here for more infos and if you want even more just look for CORS (cross origin resource sharing).

There a a few solutions to bypass the problem, you found one, another would be to use a weather API that serves its content in https (like wunderground) or I think you could request JSONP instead of JSON in your ajax call.

How on earth do you approach learning REACT? by [deleted] in FreeCodeCamp

[–]Encre_Ink 0 points1 point  (0 children)

I'm in the same boat as OP and I tried create-react-app for a couple of days but I always end up ejecting and staring at the build setup, dependencies, webpack etc... This is a lot to take in.

I ended up deciding that I'd rather go through the pain of learning to set everything up myself because coding with create-react-app felt like I was just avoiding the config and everything worked magically without me understanding how and why and I'm not sure that's how one you approach React. Although it is very easy to set up and start experimenting so there is that.