These are chat archives for FreeCodeCamp/Help

2nd
Jan 2019
glitz20
@glitz20
Jan 02 01:19
hey guys why is "redirectTo" not working in react?
 handleClick() {

        redirectTo: "/add-item";
    }

  <button onClick={this.handleClick}  className="btn btn-primary">Add New</button>
Aditya
@ezioda004
Jan 02 04:06
Whats that even suppose to do?
Anand Potukuchi
@anandpotukchi
Jan 02 08:00
/api/exercise/log?{userId}[&from][&to][&limit]
tundeiness
@tundeiness
Jan 02 08:18
Hi guys. So I still need some push to completing my marked react previewer but I have been battling with making sure the input outputs well in the previewer using the proper formatting text like \n and \r but so far it has not been totally successful. Most of the text input I want to set on a newline does not work even if I set it on a new line with \n and this has been frustrating. I have been looking for documentations to read to achieve near perfect formatting but I haven't found any . At the moment I need guide on properly formatting the text in my editor so that it can appear well as it should in the previewer. Here is my codepen on the work so far: https://codepen.io/highness/pen/ebNYVX?editors=0010 looking forward to responses. thanks.
CoderOO7
@CoderOO7
Jan 02 12:15
can anyone explain simply that what is the purpose of Symbol in JavaScript? Anc also why do we need interface or what interface is?
Praveen Saraogi
@saraogipraveen
Jan 02 13:20
anyone here familiar with angular , i've stuck in a problem need help
Johnny
@JohnnyBizzel
Jan 02 13:25
@CoderOO7 You have to do some research of your own. Remember Read-Search-Ask. I know interfaces in C# but it's not a simple one line explanation. Never heard of Symbol.
@raviloop You should state the problem you have if you want a response.
Manish Giri
@Manish-Giri
Jan 02 13:27
@JohnnyBizzel :wave:
Happy New Year mate :tada:
Praveen Saraogi
@saraogipraveen
Jan 02 13:28
@JohnnyBizzel
how i can add external JS like jquery etc into this template :- http://jasonwatmore.com/post/2018/10/29/angular-7-user-registration-and-login-example-tutorial
i've tried adding it in package.json. it still throws an error that file not found
404
Johnny
@JohnnyBizzel
Jan 02 13:28
@Manish-Giri Happy new year buddy :D
@raviloop Looks like a CORS issue: "Only secure origins are allowed"
Praveen Saraogi
@saraogipraveen
Jan 02 13:30
@JohnnyBizzel how this can be CORS issue. what i want is, i am using that template and want to add jquery,bootstrap in that project, how can i add them
Johnny
@JohnnyBizzel
Jan 02 13:30
@raviloop That link has that console error
Praveen Saraogi
@saraogipraveen
Jan 02 13:31
*thiws
*this
Manish Giri
@Manish-Giri
Jan 02 13:31
@JohnnyBizzel Are you planning to go to the HK meetup
Johnny
@JohnnyBizzel
Jan 02 13:31
@Manish-Giri Nah. I have other commitments this weekend. I thought the notice was too short.
@Manish-Giri Plus it's more expensive now that November
Manish Giri
@Manish-Giri
Jan 02 13:33
right
Johnny
@JohnnyBizzel
Jan 02 13:35
package.png
@raviloop
In stackblitz you add dependencies here
@Manish-Giri I do like HK though. I think people need more notice that a few weeks though. But I guess he's busy moving.
Praveen Saraogi
@saraogipraveen
Jan 02 13:36
@JohnnyBizzel how about bootstrap and owl-caraousel
Johnny
@JohnnyBizzel
Jan 02 13:37
@raviloop Err, try yourself? twitter-bootstrap works.
@tundeiness I can't see your code working (or not working)
this.options.highlight is not a function
Manish Giri
@Manish-Giri
Jan 02 13:38
@JohnnyBizzel true
Praveen Saraogi
@saraogipraveen
Jan 02 13:38
@JohnnyBizzel so direclty if i use npm install it should work right?
Johnny
@JohnnyBizzel
Jan 02 13:39
@raviloop Dunno. Never used stackblitz before.
Praveen Saraogi
@saraogipraveen
Jan 02 13:39
no need to add separate JS files or CDn links
no i am not using stackblitz
want to use it in local @JohnnyBizzel
May Kittens Devour Your Soul
@diomed
Jan 02 13:41
There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies.
Jose Pagan
@josepagan
Jan 02 14:07
im learning now all the back end stuff, do you think it is a good idea to start learning react at the same time?
Johnny
@JohnnyBizzel
Jan 02 14:13
@diomed :joy: :clap:
Johnny
@JohnnyBizzel
Jan 02 14:29
@josepagan If you can yes. I found it was a steep learning curve doing a full stack app however. It took me many months to complete my first.
Jose Pagan
@josepagan
Jan 02 14:31
I wonder if it is better to learn node mongo and express well, make some ‘90s’ style website and then start playing with react
thing is that my JS is ok, but by css is horrible xD, so maybe I should get better with that before I start learning react
Johnny
@JohnnyBizzel
Jan 02 14:56
@josepagan If you use Bootstrap or similar then it's easier. That's what I did. (with React)
Niraj Nandish
@Nirajn2311
Jan 02 14:57
@diomed well said :laughing: :clap:
Johnny
@JohnnyBizzel
Jan 02 15:15
@raviloop npm install should work yes.
chedli
@chedlii
Jan 02 15:33
15/16 tests passed
chedli
@chedlii
Jan 02 15:43
User Story #10: Additionally, the navbar should contain link (a) elements with the class of nav-link. There should be one for every element with the class main-section.
tundeiness
@tundeiness
Jan 02 15:59
@JohnnyBizzel here it is: https://codepen.io/highness/pen/ebNYVX?editors=0110 Apparently if you want the display to come out in certain format, One needs to style it . However the challenge I was having was that nothing could come to mind as to element to style in my previewer..there was no intuition at all at first but then I began to think that I may need to for example have a white background for a line or two line of code that will be displayed in the previwer. And how was I to do that? No idea. i have scoured several marked.js documentation but I could not make sense out of some part. I had to peek at FCC the example ( when I didn't get a response here) to know that I can do pre {background: white} and code{ background: red} It was really excruciating searching for what I need to do.
@chedlii you should have something like this: <navbar><a class="navlink"></a></navbar> this means each element in the navbar should have class navlink.
Johnny
@JohnnyBizzel
Jan 02 16:35
@tundeiness Looks like you have done it. I'm afraid this is the life of a programmer sometimes. Spending a long time to fix a small thing.
It is the persistent ones that make it and why we are paid well.
May Kittens Devour Your Soul
@diomed
Jan 02 17:07
@chedlii u dont need body tags in codepen
CoderOO7
@CoderOO7
Jan 02 17:47
can anyone tell what is mean by context in terms of function ..?
Jose Pagan
@josepagan
Jan 02 17:52
@CoderOO7 whatever around that affects the function
whatever the function can ‘see'
CoderOO7
@CoderOO7
Jan 02 18:00
@josepagan means its define the scope of function?
tundeiness
@tundeiness
Jan 02 18:00
@JohnnyBizzel yes it's done. Thanks.
Jose Pagan
@josepagan
Jan 02 18:04
scope and context are refers to the same idea
Kelechi Chinaka
@ke1echi
Jan 02 18:04
nice job @tundeiness
Jose Pagan
@josepagan
Jan 02 18:04
scope is seen from outside, the context is what the function sees
i recommend you the udemy course “javascript understanding the weird parts"
and of course the “you dont know JS” book
CoderOO7
@CoderOO7
Jan 02 18:06
@josepagan ohk thanx man...
Currently I'm reading Eloquent JS book..
Jose Pagan
@josepagan
Jan 02 18:07
that book is crap
sorry
but I think it is very bad for learning
CoderOO7
@CoderOO7
Jan 02 18:07
but why?
Jose Pagan
@josepagan
Jan 02 18:08
that book was made to show how good the author is understanding javascript
I like the book only to test that I am getting better at JS but not to learn JS
CoderOO7
@CoderOO7
Jan 02 18:10
But can I use you don't know JS as a beginner..Although I have earn JS certification from fcc . But I'm not statisfied with what I learn or not able to understand properly
Jose Pagan
@josepagan
Jan 02 18:11
YDNJS is in my opinion THE BOOK of JS, it slows downs where the tough bits are
it is written from the perspective of someone who is trying to understand JS
it slows downs where the hard bits are, and it goes deep, sometimes maybe too deep. But it does not asume that you know things
CoderOO7
@CoderOO7
Jan 02 18:13
@josepagan ohk thnx ..
Jose Pagan
@josepagan
Jan 02 18:14
Eloquent Javascript is like that math teacher who only liked to be with the smarts kids. “JS the weird parts” and “You dont know JS” are like the teacher who wanted you to understand
dont hate Eloquent Javascript, but when you get stuck, dont blame yourself, blame the book
CoderOO7
@CoderOO7
Jan 02 18:15
I need a favour I am thinking of starting javascript30days project to apply my skills what I have learn.
@josepagan according to you it is a good idea or bad?
Jose Pagan
@josepagan
Jan 02 18:16
it is good to learn little bits, and to practice. To be honest I only did the first two exercises, I wish I did more, now I have to learn a few things!
CoderOO7
@CoderOO7
Jan 02 18:17
ohk thnx for your recommendation.
Jose Pagan
@josepagan
Jan 02 18:17
I have been for a couple of years, trying to learn, then forgetting about it, anything that makes you progress is good
CoderOO7
@CoderOO7
Jan 02 18:18
thnx....
I will start js30Days from tomorrow..
Lia-Sue-Kim
@Lia-Sue-Kim
Jan 02 18:19
what is js 30days
Jose Pagan
@josepagan
Jan 02 18:19
it is good as a way to push yourself to do small projects
it is a set of projects, in theory you can do one per day, it is small front end javascript bits
what I like is that it pushes you to use pure JS
Lia-Sue-Kim
@Lia-Sue-Kim
Jan 02 18:20
where
and is it for free
Jose Pagan
@josepagan
Jan 02 18:20
dunno google it
you have a project and then the guy solves the project in his way
first day is a keyboard drum box, really cool, second day is a timer or something like that
Lia-Sue-Kim
@Lia-Sue-Kim
Jan 02 18:21
i googled it but with vanilla js
May Kittens Devour Your Soul
@diomed
Jan 02 19:13
it is free
Manish Giri
@Manish-Giri
Jan 02 20:05
@diomed x
Jason Luboff
@JLuboff
Jan 02 20:07
@Manish-Giri :wave:
Manish Giri
@Manish-Giri
Jan 02 20:07
@JLuboff :wave:
Happy New Year!
Jason Luboff
@JLuboff
Jan 02 20:07
To you as well!
Have a good one?
Manish Giri
@Manish-Giri
Jan 02 20:07
it was all right
not a lot going on in this city
at least nothing like SF, LA, NY
what about you
Jason Luboff
@JLuboff
Jan 02 20:08
Ya not bad. Didn't stay up but had a few friends over yesterday. BBQ'd some kabobs and hot dogs
Manish Giri
@Manish-Giri
Jan 02 20:09
nice
May Kittens Devour Your Soul
@diomed
Jan 02 20:38
@Manish-Giri meowdy :cat:
May Kittens Devour Your Soul
@diomed
Jan 02 20:57
@Manish-Giri can you get lost in a labyrinth?
tundeiness
@tundeiness
Jan 02 21:54
@ke1echi Thanks!!!! *wipes brow
May Kittens Devour Your Soul
@diomed
Jan 02 21:55
github_cat.svg
tundeiness
@tundeiness
Jan 02 22:01
I need help on a particular concept I have. I have 2 react component and I want it in such a way that if I click a button on either one of the components, one component is hidden while the clicked component is still available. i'd like to know the best approach to this concept? Looking forward to your responses.
May Kittens Devour Your Soul
@diomed
Jan 02 22:03
tundeiness
@tundeiness
Jan 02 22:06
@diomed thanks will check it out. But the toggle I have been seeing seems not to be working for my particular situation.