These are chat archives for FreeCodeCamp/Help

14th
Oct 2018
please give me a review
Anand Potukuchi
@anandpotukchi
Oct 14 2018 08:41
Anyone know where the legacy curriculum is?
Anand Potukuchi
@anandpotukchi
Oct 14 2018 11:30
hi
Atulsinghm
@Atulsinghm
Oct 14 2018 12:03
hello all my loving friend
need urgent help
mustimuu
@mustimuu
Oct 14 2018 12:05
Can someone help me ?
I am currenty working on a website, where it has inbuild bootstrap.
I want to change a container to container-fluid, which is something that comes by default from bootstrap.
My html wont go fluid, because of that container
Atulsinghm
@Atulsinghm
Oct 14 2018 12:06
please help me related this issue
Initialize a to a value of 9
Bjorn van de Peut
@bjorno43
Oct 14 2018 12:15
@Atulsinghm What is it that you do not understand? If you look at the example given, all the information you need is already there. All you have to do is change it according to the assignment
Atulsinghm
@Atulsinghm
Oct 14 2018 12:18
@bjorno43 can you please explain i am not getting right now
Bjorn van de Peut
@bjorno43
Oct 14 2018 12:23

@Atulsinghm Lets look at the example: var myVar = 0;.
The first part is var. This tells Javascript that you want to initialize a variable.
The second part is myVar. This is the name of your variable. So you're initializing myVar
Next comes the = character. This tells javascript that you want to give myVar a value.
And lastly comes 0. This is the value you're giving to myVar. So now the end result is that you've initialized myVar with the value 0.

Now how do you suppose we do this if we have to initialize a new variable with the name a and give it a value of 9?

Bjorn van de Peut
@bjorno43
Oct 14 2018 12:32
@Atulsinghm Don't be afraid to give me a wrong answer. Only by trying you will learn. That's why I'm not giving you the solution. Because you wouldn't learn anything from that :)
Atulsinghm
@Atulsinghm
Oct 14 2018 12:38
@bjorno43 hahahahahaha
thanks brother just trying to solve that
Bjorn van de Peut
@bjorno43
Oct 14 2018 12:40
@Atulsinghm And I'm trying to teach you. So have a go at it. What do you think will be the solution?
Let me give you another example. I can't make it more simple than that: var b = 7;
Atulsinghm
@Atulsinghm
Oct 14 2018 12:42
@bjorno43 it was so simple brother
Bjorn van de Peut
@bjorno43
Oct 14 2018 12:43
So you got the solution?
Atulsinghm
@Atulsinghm
Oct 14 2018 12:43
ya
Bjorn van de Peut
@bjorno43
Oct 14 2018 12:43
Great! :thumbsup:
Atulsinghm
@Atulsinghm
Oct 14 2018 12:44
i am
practicing more than 4 - 5 hour
Bjorn van de Peut
@bjorno43
Oct 14 2018 12:45
Then it's about time you take a break. You shouldn't spend more than 3 hours doing the same thing in a row. Go play a game or watch a serie for an hour. Then get back on it
Atulsinghm
@Atulsinghm
Oct 14 2018 12:45

thats why get confuse

but a big thanks

today i finished more than 45 lessons
Bjorn van de Peut
@bjorno43
Oct 14 2018 12:46
That's nice, but please, take my advise and take a break. Otherwise you'll face the consequences sooner or later
There's actually a post on our forums about this here: https://www.freecodecamp.org/forum/t/what-strategies-do-you-guys-use-to-stay-energized/232122 That's what happens if you keep pushing yourself too much. You should read it :)
Atulsinghm
@Atulsinghm
Oct 14 2018 12:49
ok brother
May Kittens Devour Your Soul
@diomed
Oct 14 2018 13:25
where art thou?
psyperl
@psyperl
Oct 14 2018 14:22
art? i know some art.. where? i dunno
Philip Durbin
@pdurbin
Oct 14 2018 14:24
The Art of Unix Programming
Ahmad Abdolsaheb
@ahmadabdolsaheb
Oct 14 2018 14:48
which library is used for writing tests for the challenges?
Radek
@radekjohn
Oct 14 2018 15:26
Hi. is there anybody familiar with the Marked.js?
Christopher McCormack
@cmccormack
Oct 14 2018 15:44
@radekjohn hi several of us have used it for the Front-End Markdown Viewer project
Radek
@radekjohn
Oct 14 2018 16:07

@cmccormack Well, I am doing it right now. I am nearly there but I have problem with parsing HTML. This is my code:

https://codepen.io/radekjohn/pen/zmEvMV?editors=0011

I thing that I am missing something on the row 34 ({marked(this.state.value)}). But I don not know whot is it.

Christopher McCormack
@cmccormack
Oct 14 2018 16:10
@radekjohn try using dangerouslySetInnerHTML - <Preview id="preview" dangerouslySetInnerHTML={{__html: marked(this.state.value)}} />
Radek
@radekjohn
Oct 14 2018 16:11
OK. Thanks. I will try it
May Kittens Devour Your Soul
@diomed
Oct 14 2018 16:11
@psyperl your lack of understanding what my reference is about troubles me
gotta download more ram
Radek
@radekjohn
Oct 14 2018 16:12
see you all alter.
May Kittens Devour Your Soul
@diomed
Oct 14 2018 16:12
alter boy
May Kittens Devour Your Soul
@diomed
Oct 14 2018 16:30
Kyle Holm
@thekholm80
Oct 14 2018 16:32
that cat has seen things
Christopher McCormack
@cmccormack
Oct 14 2018 16:37
@thekholm80 you done any backend testing with mocha/chai and mongo?
Kyle Holm
@thekholm80
Oct 14 2018 16:39
not really. writing tests is an art i'm not super excited to learn
i get the usefulness and 100% think it's worth doing, but i haven't made myself do it yet
Christopher McCormack
@cmccormack
Oct 14 2018 16:39
it's definitely interesting...
The Infosec and QA section of FCC uses it for all the projects
Philip Durbin
@pdurbin
Oct 14 2018 16:41
@ahmadabdolsaheb "Challenge tests can make use of the Node.js and Chai.js assertion libraries." https://github.com/freeCodeCamp/freeCodeCamp/blob/master/docs/style-guide-for-curriculum-challenges.md#writing-tests
Christopher McCormack
@cmccormack
Oct 14 2018 16:42
@pdurbin you familiar with mocha and mongo testing?
Philip Durbin
@pdurbin
Oct 14 2018 16:42
nope
Christopher McCormack
@cmccormack
Oct 14 2018 16:42
dang
got a problem I can't seem to figure out :)
Philip Durbin
@pdurbin
Oct 14 2018 16:43
at work we use junit
Christopher McCormack
@cmccormack
Oct 14 2018 16:44
for Java?
Philip Durbin
@pdurbin
Oct 14 2018 16:44
yeah
Ken Haduch
@khaduch
Oct 14 2018 16:45
hey there everybody!
Christopher McCormack
@cmccormack
Oct 14 2018 16:45
@khaduch heya
Ken Haduch
@khaduch
Oct 14 2018 16:45
@cmccormack - howdy!
Christopher McCormack
@cmccormack
Oct 14 2018 16:46
@khaduch what's going on today?
Kyle Holm
@thekholm80
Oct 14 2018 16:48
@khaduch :wave:
Ken Haduch
@khaduch
Oct 14 2018 16:49
well, just checking into the chat rooms - I've been away (because I thought that I lost all of my freecodecamp progress with the new updates) but I tried again and saw that things seemed to be okay, so I started (or resumed) going through the lessons...
@thekholm80 - howdy!
Christopher McCormack
@cmccormack
Oct 14 2018 16:49
@khaduch that must have been a pleasant surprise
Ken Haduch
@khaduch
Oct 14 2018 16:50
Also I've been doing to work on my house (painting, mostly scraping) to try and get some badly needed painting done before it gets too cold, so it takes a lot of time!
@cmccormack - yes, it was good to see that I could log in again (that also seemed to be a problem for a while) and find that most of the early lessons were checked off. So I'm trying to catch up!
@cmccormack - what kind of problem are you trying to figure out? I'm probably rusty... but I need to get my head back in the game!
Christopher McCormack
@cmccormack
Oct 14 2018 16:57
@khaduch haha I actually just solved it after racking my brain for two days
basically I would create like 20 fake documents in the before method to populate
Ken Haduch
@khaduch
Oct 14 2018 16:58
@cmccormack - oh that's great!
Christopher McCormack
@cmccormack
Oct 14 2018 16:58
then create a new doc later as part of a POST method test
but the timestamps kept coming back the same for the test and autogenerated documents
Turns out it was due to using bumped_on: { type: Date, default: Date.now() }, instead of bumped_on: { type: Date, default: Date.now },
I'm not really sure why
The test doc would have the same timestamp as the autogenerated, so maybe mongo will use that same date for all new docs if you invoke the method?
@khaduch painting is the worst, hope you get it done soon so you can relax this winter :)
Bjorn van de Peut
@bjorno43
Oct 14 2018 17:18
Evening :wave:
You know what really bugs me?
Christopher McCormack
@cmccormack
Oct 14 2018 17:20
@bjorno43 mosquitos?
Bjorn van de Peut
@bjorno43
Oct 14 2018 17:20
Pressing F5 to refresh in FF updates all the files and images like I want to. But Chrome be like: Nooooo! Unless you Ctrl+F5, I will just serve you my cache!
Christopher McCormack
@cmccormack
Oct 14 2018 17:21
The latter case is more preferred though
unless you're troubleshooting :)
Bjorn van de Peut
@bjorno43
Oct 14 2018 17:21
@cmccormack Luckily not anymore. Seems like Diabetes has 1 advantage: Mosquitos no longer like my blood
Christopher McCormack
@cmccormack
Oct 14 2018 17:21
there are caching headers that should be acknowledged
@bjorno43 haha
Aditya
@ezioda004
Oct 14 2018 17:22
@cmccormack @thekholm80 Finished drum machine https://drum-machine.netlify.com/, yay another certificate
@khaduch Good to see you, missed your reviews :D
Bjorn van de Peut
@bjorno43
Oct 14 2018 17:23
And no. For a chatsystem, caching is definitely not preferred. Users changing profile images all the time etc etc
Christopher McCormack
@cmccormack
Oct 14 2018 17:23
@ezioda004 haha oh jeeze way to make ours look bad
Looks great though!
@bjorno43 that should be based on the header then right?
Bjorn van de Peut
@bjorno43
Oct 14 2018 17:24
Ye I know. I mean, I know I can fix the issue easily with the headers. Just bugging me that Chrome does it, but FF not
Kyle Holm
@thekholm80
Oct 14 2018 17:25
@ezioda004 yay :tada: congrats
Christopher McCormack
@cmccormack
Oct 14 2018 17:25
@ezioda004 gotta update that favicon though
Bjorn van de Peut
@bjorno43
Oct 14 2018 17:25
I expect odd behaviour from IE / Edge. Even from Opera. But not from those 2, lol
Aditya
@ezioda004
Oct 14 2018 17:25
Thanks I'm feeling too lazy now
Christopher McCormack
@cmccormack
Oct 14 2018 17:25
And why can't I click the drum?!?
@bjorno43 you sure you don't have caching disabled in the FF dev tools maybe?
I know I accidentally leave that on all the time in chrome
Bjorn van de Peut
@bjorno43
Oct 14 2018 17:27
No I didn't. I actually have FF Developer Edition for development. I don't mess around with my normal FF
Aditya
@ezioda004
Oct 14 2018 17:27
@cmccormack I was thinking to add that but theres one sound which uses base and hi-hat so I wasnt sure which one should be clicked
Christopher McCormack
@cmccormack
Oct 14 2018 17:28
@ezioda004 ah really digging in to the minutae
I would have just added another drum or something haha
Aditya
@ezioda004
Oct 14 2018 17:30
@cmccormack Those svgs were hard to find haha, reminds me I should add the source
Bjorn van de Peut
@bjorno43
Oct 14 2018 17:30
@ezioda004 Add a record or playback option. Perhaps even timings so you can make a song :P
Christopher McCormack
@cmccormack
Oct 14 2018 17:31
And why isn't your logo/brand on that base drum??
Bjorn van de Peut
@bjorno43
Oct 14 2018 17:32
Wait.. I actually managed to crash my audio driver by pressing the keys way too fast..
Aditya
@ezioda004
Oct 14 2018 17:33
@bjorno43 Thats neat idea, but seems like a lot of work
@cmccormack Oh thats cool, I certainly can do with some CSS shenanigans
But gonna call it a day for this one, gonna read/study something else
Bjorn van de Peut
@bjorno43
Oct 14 2018 17:35
@ezioda004 I think it would actually be rather easy. Basicly just have an array of keys. Simulate keypress. Add timers. Done. Though perhaps a bit over simplified like that, ghehe
Christopher McCormack
@cmccormack
Oct 14 2018 17:35
I've done that with timers, not so bad
Now I want to do this..
Aditya
@ezioda004
Oct 14 2018 17:36
Will have to look into it, funnily it took me only of couple of hours to write JS but CSS took me 2 days
Bjorn van de Peut
@bjorno43
Oct 14 2018 17:37
Not surprising. We're developers, not designers :laughing:
Kyle Holm
@thekholm80
Oct 14 2018 17:38
friends don't let friends write css
Bjorn van de Peut
@bjorno43
Oct 14 2018 17:41
Got the same issue with my chatsystem. Been working on it for weeks. Adding all kinds of functions and options. Code been flowing through my mind like there's no tomorrow. But now I'm at the part of designing it.. I've written about 15 lines in the past 5 hours..
May Kittens Devour Your Soul
@diomed
Oct 14 2018 17:41
so far so good
Bjorn van de Peut
@bjorno43
Oct 14 2018 17:41
On a side note: Curse GDPR!
May Kittens Devour Your Soul
@diomed
Oct 14 2018 17:42
@bjorno43 be like
Bjorn van de Peut
@bjorno43
Oct 14 2018 17:43
@diomed That's math. Me !== Math :P
May Kittens Devour Your Soul
@diomed
Oct 14 2018 17:44
ok. sorry that I didn't find matrix chicken soup code that supports that gif
Kyle Holm
@thekholm80
Oct 14 2018 17:44
math > bob
Bjorn van de Peut
@bjorno43
Oct 14 2018 17:44
@thekholm80 Actually, I came up with the perfect encryption that can't be cracked. Only to notice it had been invented before later..
Turned out my idea was known as "one-time pad" encryption :joy:
Basicly an encryption where the decryption key can only be used once
May Kittens Devour Your Soul
@diomed
Oct 14 2018 17:49
@bjorno43 when I asked why they dont use MD5 HASH they told me it's too fast ?!?
Aditya
@ezioda004
Oct 14 2018 17:49
if (hash.key().usedBefore) {
  hash.forgetKey();
}
May Kittens Devour Your Soul
@diomed
Oct 14 2018 17:49
ummm wut?
Bjorn van de Peut
@bjorno43
Oct 14 2018 17:50
@diomed Whut? Lol, no, that's definitely not the reason xD
May Kittens Devour Your Soul
@diomed
Oct 14 2018 17:50
is that a valid answer? how can it be too fast?
Aditya
@ezioda004
Oct 14 2018 17:50
Isnt MD5 relatively easy to decrypt?
Bjorn van de Peut
@bjorno43
Oct 14 2018 17:51
With the current capabilities of hardware, decrypting MD5 within a reasonably timeframe became possible. That's why they no longer recommend it
May Kittens Devour Your Soul
@diomed
Oct 14 2018 17:51
We don’t use md5 to hash our passwords as it is too fast, we use the bcrypt algorithm
catapulto
@catapulto
Oct 14 2018 17:51
i just completed all the web design projects but didn't got my certification
is there any delay ?
can anybody tell me?
Aditya
@ezioda004
Oct 14 2018 17:52
@catapulto You need to go to your fcc profile and claim it from there
May Kittens Devour Your Soul
@diomed
Oct 14 2018 17:52
claim it like you own it
Aditya
@ezioda004
Oct 14 2018 17:53
Can you own something digital :thought_balloon:
Kyle Holm
@thekholm80
Oct 14 2018 17:53
i own a digital clock
psyperl
@psyperl
Oct 14 2018 17:53
i own a digital rock
Kyle Holm
@thekholm80
Oct 14 2018 17:53
well, 3 more payments and it's mine
Bjorn van de Peut
@bjorno43
Oct 14 2018 17:55
You can't own anything. Not even your own life. Did you know there's law against commiting suicide? They made that because it's illegal to damage government property
Kyle Holm
@thekholm80
Oct 14 2018 17:55
3edgy5me
Bjorn van de Peut
@bjorno43
Oct 14 2018 17:55
:joy:
Aditya
@ezioda004
Oct 14 2018 17:56
Did you just call all of us objects?
Internally triggered
Bjorn van de Peut
@bjorno43
Oct 14 2018 17:56
"Did you just call all of us objects?" - Javascript
thekholm80 @thekholm80 cries in javascript
Aditya
@ezioda004
Oct 14 2018 17:57
No, thats python
Christopher McCormack
@cmccormack
Oct 14 2018 18:23
@bjorno43 @ezioda004 how do you get to approve PRs, do you have to ask for access?
Bjorn van de Peut
@bjorno43
Oct 14 2018 18:26
@cmccormack I got it because I'm a moderator. I've got privileges on almost everything related to FCC. Not sure how someone else gets it tbh
Aditya
@ezioda004
Oct 14 2018 18:26
@cmccormack Yeah, Quincy posted few weeks ago they needed help with QA'ing and merging PR's, so he gave me access for helping out
Christopher McCormack
@cmccormack
Oct 14 2018 18:26
ah makes sense
Thanks for the info
Almost done with the last FCC project, figured I would try to help out once done
Bjorn van de Peut
@bjorno43
Oct 14 2018 18:28
Just give a shout out in the Contributors room. Tag Quincy and / or Raisedadead and I'm sure they'll set you up soon enough
Christopher McCormack
@cmccormack
Oct 14 2018 18:28
Will do thanks!
mustimuu
@mustimuu
Oct 14 2018 18:30
can someone help me with some bootstrap?
Aditya
@ezioda004
Oct 14 2018 18:32
@cmccormack Oh cool, I started out recently as well, wanted to get started with Open Source and FCC is pretty beginner friendly with that
Bjorn van de Peut
@bjorno43
Oct 14 2018 18:32
@cmccormack This might be interesting read for you: https://www.freecodecamp.org/forum/t/freecodecamp-moderator-guidelines/18295 Those are our guidelines on moderating FCC. Perhaps you'll find some more interesting ways to help out :)
Christopher McCormack
@cmccormack
Oct 14 2018 18:32
@ezioda004 some of these seem so simple and straight forward, if they seem that way is a PR approval quick? Like this one for example, seems like the update is fine and only modifies text
Thanks, both of you
mustimuu
@mustimuu
Oct 14 2018 18:33
Can someone help me out ? :D
Christopher McCormack
@cmccormack
Oct 14 2018 18:34
@mustimuu heya you can just ask the question, we can try and help
Bjorn van de Peut
@bjorno43
Oct 14 2018 18:34
@mustimuu Don't ask to ask. Just ask your question. We don't know if we can help if we don't know what the issue is. Keep in mind that if it's a complicated question, we prefer that you make a Codepen or JSFiddle with your code.
mustimuu
@mustimuu
Oct 14 2018 18:35
i want my container to go full width, which i use container-fluid.
But i am working in a template where it has inbuild bootstrap, which have "container" instead of fluid.
Now i cant just change the structure, but can i not do something, so i give that container a fluid?
@bjorno43 Roger
@cmccormack Roger
Christopher McCormack
@cmccormack
Oct 14 2018 18:35
Are the forums included in the FCC repo?
Just found a bug in that
Aditya
@ezioda004
Oct 14 2018 18:36
@cmccormack PR approval entirely depends on if someone come across that PR and reviews it, since there is sheer number PR's, even the easy ones get easily missed, but yeah as long as PR can approved and passes the build test, it can be merged
Christopher McCormack
@cmccormack
Oct 14 2018 18:36
@mustimuu you may want to add some custom CSS to do what the -fluid class does, and provide more specificity in your CSS selector
Niraj Nandish
@Nirajn2311
Oct 14 2018 18:37
Hey @ezioda004 could you close #19121
Christopher McCormack
@cmccormack
Oct 14 2018 18:37
@ezioda004 seems simple enough. Who maintains the CI tests?
Niraj Nandish
@Nirajn2311
Oct 14 2018 18:37
it is invalid
Christopher McCormack
@cmccormack
Oct 14 2018 18:38
And with all these PRs happening at the same time are those test results current?
Bjorn van de Peut
@bjorno43
Oct 14 2018 18:38
@cmccormack Not sure, but I don't think they are. There are quite a few issues with the forum currently that we're very much aware of, but haven't been able to do anything about ourselves. IE: We have to rely on Quincy or Raisdadead for fixing those
mustimuu
@mustimuu
Oct 14 2018 18:38
@cmccormack how i do that?
@cmccormack exactly
@cmccormack the only way is the css
Christopher McCormack
@cmccormack
Oct 14 2018 18:41
@mustimuu you can inspect what container-fluid does, and copy that CSS to a custom selector you make, somehing like container.fluid or something. I'm not sure what exactly you would need to change though, as those are different selectors, so you may need to remove padding/margins, etc...
@bjorno43 thanks, i'll ping them or add a note in the contributor room I guess
I'm out for a bit, thanks for the help/advice!
Bjorn van de Peut
@bjorno43
Oct 14 2018 18:42
On a side note: How's this for strange family bonds? Today we, that's me, my 2 younger brothers, our mother and both uncle / aunt, all use the same Unlock pattern on our phones without us knowing it from eachother :joy:
Aditya
@ezioda004
Oct 14 2018 18:42
@Nirajn2311 Thanks for informing, closed.
@cmccormack The tests are build tests, so they check for if the PR breaks the site and the PR follows certain required rules. Yeah those results are current, it automatically runs for each PR
idris
@idris12
Oct 14 2018 19:02
why does the first work but not the second one
question.PNG
nvm i figured it out
Aditya
@ezioda004
Oct 14 2018 19:06
@idris12 Just for the sake of clarity, Object properties are identifiers so they follow the variable rules, they can't contain hypen -, if you want to use font-size then make it s a string "font-size"
May Kittens Devour Your Soul
@diomed
Oct 14 2018 19:08
@bjorno43 hacking into his family's phones like a pro
Bjorn van de Peut
@bjorno43
Oct 14 2018 19:12
@diomed If I found a way to hack unlock patterns on phones, I'd be rich :P
Danny McVey
@dannymcvey
Oct 14 2018 19:59
I’ll be online for a little while if anybody needs help...
PM me
Danny McVey
@dannymcvey
Oct 14 2018 20:18
Signing out...
May Kittens Devour Your Soul
@diomed
Oct 14 2018 20:30
damn, I've missed a chance for a free help :(
there goes my coupon :: expired ::
yj
@atangyj
Oct 14 2018 20:47
Hello, I’am working on the pomodoro project. I tried to develope it by React, but I have some issues. I have this.state={ session_length: initial_value, time_left: initial_value}. when time counting down, the time will be updated to time_left property. When press session increment button, the time session_length should increase, and the time_left will change corresponds to the session_length. However, the time_left property failed to update corresponding to the session_length property.
Could anyone help me understand how I can solve this problem?
Aditya
@ezioda004
Oct 14 2018 20:51
@atangyj Without looking at how you've implemented its hard to guess where it could've gone wrong
yj
@atangyj
Oct 14 2018 20:55
@ezioda004 I’m not sure if it’s okay to paste lines of code to ask for help.
is this okay?
Bjorn van de Peut
@bjorno43
Oct 14 2018 20:57
@atangyj Please use services like Pastebin or Codepen when you want to share large amounts of code (40+ lines). Posting that directly in chat disrupts any conversations other users might have and is therefor considered spamming :)
Aditya
@ezioda004
Oct 14 2018 20:57
@atangyj I'd suggest using codepen or codesandbox.io
yj
@atangyj
Oct 14 2018 20:57
@bjorno43 you’re right, sorry for that. I will delete and repo again
Bjorn van de Peut
@bjorno43
Oct 14 2018 20:58
@atangyj :thumbsup:
May Kittens Devour Your Soul
@diomed
Oct 14 2018 21:07
if someone has push access to repository, he can merge.
a) true
b) false
yj
@atangyj
Oct 14 2018 21:08
@bjorno43 @ezioda004 I’ve never write React on codepen and codesanbox. Do you mind I share it on GitHub? https://goo.gl/4DsVpY
Bjorn van de Peut
@bjorno43
Oct 14 2018 21:16
@atangyj The way you share it doesn't really matter for as long as it's a safe host. That means: Users can see the code without registering or being spammed with advertisements all over the place and obviously no dangerous scripts
Aditya
@ezioda004
Oct 14 2018 21:17

@atangyj As I can see you have:

  sessionIncrement(){
    this.setState({
      session_length: this.state.session_length + 1,
      time_left: this.state.session_left
    });
  }

But there is no session_left in this.state.

yj
@atangyj
Oct 14 2018 21:18
@ezioda004 it should be session_length
Aditya
@ezioda004
Oct 14 2018 21:19
You want time_left to be incremented by 1 right?
yj
@atangyj
Oct 14 2018 21:20
not exactly, I want time_left will be update to the value of session_length
So, when user press a button to increase the session_length, the displayed time_left update too
Aditya
@ezioda004
Oct 14 2018 21:22
@atangyj Then do this.state.session_length + 1 as well for time_left?
yj
@atangyj
Oct 14 2018 21:24
@ezioda004 oh, you’re right. You just made me feel I am being silly. I stucked in why it doesn’t apply the updated session_length to update time_left
@ezioda004 thank you so much, and sorry for unconsiderately share the script.
@bjorno43 Thank you for letting me know.
Aditya
@ezioda004
Oct 14 2018 21:26
@atangyj No problem. Although, I still think it should be time_left + 1.
Example: say session length is 25 and time left is 5, so when a user increments, session length updates to 26 and time left should update to 6 right?
yj
@atangyj
Oct 14 2018 21:29
@ezioda004 in my case, when a user increments the session length, it means having a new session length, so the time left should be same as the increased session length.
Aditya
@ezioda004
Oct 14 2018 21:31
@atangyj Oh I get what you mean :thumbsup:
Bjorn van de Peut
@bjorno43
Oct 14 2018 21:32
@atangyj No problem :thumbsup:
yj
@atangyj
Oct 14 2018 21:32
:thumbsup:
Ken Haduch
@khaduch
Oct 14 2018 21:42
@ezioda004 :point_up: October 14, 2018 1:22 PM - thanks! I hope to get back into this on a more regular basis now that summer is winding down...
Ahmad Abdolsaheb
@ahmadabdolsaheb
Oct 14 2018 23:50
@pdurbin thanks
Philip Durbin
@pdurbin
Oct 14 2018 23:53
sure