thanks a lot. great explanation, crystal clear and simple. Just 1 suggestion: keep your font size big enough so that students can watch on mobile device and type on pc
This is a great tutorial, easy to understand! I was hoping for you to do more tutorials in web3 cause I would like to learn it from you. Thanks, David!
@@software-sage I would suggest you to share a video of building the first blockchain App Using Ethereum 🤗. That is what I want to learn and I believe it will be easy to learn from your video. Tqsm
The videos is good, but you could increase your font size of maximize your vscode, so that we can see the code properly. I have a mac and the screen is really small to follow along.
Nicely explained, but I want to implement the function that only one decimal will be there, like we are only allowed to enter ' . ' only once then how can we do it?
Once a decimal is entered, block further input of decimals. I’m sure there is a way to do it. Google “prevent multiple decimal points JavaScript” or something like that
@@software-sage This calculator can't calculate the numbers from/above 10... It can only calculate the numbers under 10 and show the sum. e.g. 10+20 or 100*21 etc. This is not possoble to calculate...😔
@@JuNe-rm6pk instead of: setText((text) => [...text, val + " "]) change the line to: setText((text) => [...text, val]) and it will work fine, mathjs will not calculate with spaces in between numbers.
To avoid errors during evaluation, inside the calculateResult() function, instead of *"const input = text.join("")"* use *"const input = text.join("").replace(/ +/ g , "")"*
i have a doubt,in the end when we are adding handleclick equals to result's function it will pass it as a prop but in button's component's onclick function we have written onclick={()=>handle(symbol)} so how is this working?
I’m not sure why. It should be working. It could be an issue with how the input is being read in. If you come up with a solution, you can make a pull request in the GitHub repo and I can take a look at it!
Hey, what is the name of the following "technique" you used? I don't really understand it and I would like to look into it some more. setText((text) => [...text, val + " "]);
@@software-sage Thanks! I realized it's the state hook, but I was talking about the code between the square brackets. The one with the three dots. By the way, I just saw your last name, are you of Georgian descent?
This is by far the best tutorial I've seen on the calculator in React, thank you!!!
Awesome glad that you liked it
thanks a lot. great explanation, crystal clear and simple.
Just 1 suggestion: keep your font size big enough so that students can watch on mobile device and type on pc
Thank you for the feedback
This is a great tutorial, easy to understand! I was hoping for you to do more tutorials in web3 cause I would like to learn it from you. Thanks, David!
More to come! What topics would you suggest?
@@software-sage I would suggest you to share a video of building the first blockchain App Using Ethereum 🤗. That is what I want to learn and I believe it will be easy to learn from your video. Tqsm
it has problem if we press 7 and 5 it means 75 + "..." error will happen, can't we calculate numbers greater than tens or more?
The videos is good, but you could increase your font size of maximize your vscode, so that we can see the code properly. I have a mac and the screen is really small to follow along.
Yes thanks for the feedback. Noted.
Nicely explained, but I want to implement the function that only one decimal will be there, like we are only allowed to enter ' . ' only once then how can we do it?
Once a decimal is entered, block further input of decimals. I’m sure there is a way to do it. Google “prevent multiple decimal points JavaScript” or something like that
Thanks for the tutorial! But why is not working for numbers above/ over 10? Could this be a limitation on mathjs?
Can you please provide an example?
@@software-sage This calculator can't calculate the numbers from/above 10... It can only calculate the numbers under 10 and show the sum. e.g. 10+20 or 100*21 etc. This is not possoble to calculate...😔
@@JuNe-rm6pk instead of: setText((text) => [...text, val + " "]) change the line to: setText((text) => [...text, val]) and it will work fine, mathjs will not calculate with spaces in between numbers.
@@dendy984 this didnt work either, got another solution?
@@samueligwe3858 it did work. "setText((text) => [...text, val]);"
Do You actually prevent user from adding + sign 2 times in a row? Etc?
No, you would have to build off of what I provided in this tutorial. It’s a good starting point
Thank u very much it was really helpful and easy to understand
To avoid errors during evaluation, inside the calculateResult() function, instead of *"const input = text.join("")"* use *"const input = text.join("").replace(/ +/ g , "")"*
i have a doubt,in the end when we are adding handleclick equals to result's function it will pass it as a prop but in button's component's onclick function we have written onclick={()=>handle(symbol)} so how is this working?
Can you comment the exact timestamp you are referring to?
Make video on chat app, portfolio and more in react js
What happens if you press the "=" without any input? also what happens if you press it again after calculating the input?
Try it for yourself. If it is not what you want, you can modify the program. This is just a starter project that can be expanded on.
Is this working for calculating double digits??
Yes it should be
@@software-sage it not working
single number works fine like 5+5 but 55+55 is not working why ?
I’m not sure why. It should be working. It could be an issue with how the input is being read in. If you come up with a solution, you can make a pull request in the GitHub repo and I can take a look at it!
@@software-sage did you try whether it works for you ?
Best tutorial on calci in react!
Thanks
The decimal point doesn't work?
Thanks for the tutorial though, found it helpful
It should
i am tryind to do this calculator but it is not working ,i think you miss some steps .
It’s been working for other people. Maybe try again from the beginning?
Nice tutorial :)
to make it work with two and more digit numbers it should be setText(text=>[...text, val + ''
not ' '
when I used " " nothing worked for me. Instead I used this setText(text=>[...text, val ]
It also worked for me as I took out the space from “”
Unexpected operator .
Great tutorial...
Glad you liked it!
Thank you very much
Hey, what is the name of the following "technique" you used? I don't really understand it and I would like to look into it some more. setText((text) => [...text, val + " "]);
"Using the State Hook"
reactjs.org/docs/hooks-state.html
th-cam.com/video/O6P86uwfdR0/w-d-xo.html
@@software-sage Thanks! I realized it's the state hook, but I was talking about the code between the square brackets. The one with the three dots. By the way, I just saw your last name, are you of Georgian descent?
@@davidbalyan thats a spread operator
@@kinstar why cant we write it as setText({...text, text:val + " "});
Thank you sir
Not Expo
Exponent?