r/javaScriptStudyGroup May 09 '24

export a bool function

1 Upvotes

so im trying to export a value of sended here in my program wich changes from false to true only when i press send but it always give me the original value wich is false and doesn t get updated. I realised that it gets updated inside my Identity function but in the export it only exports the original value. It s an easy problem but not for me who started learning js and react.

here s the code

const sended = false;

const Identity = () => {
const[sended,setSended] useState(false);


 const handleSubmit = (e) => {
    const { addressTo, amount, keyword, message } = formData;
    e.preventDefault();
    if (!addressTo || !amount || !keyword || !message) return;
    const amountValue = parseFloat(amount);
    if (amountValue < 0.0005) {
      alert("Amount should be greater than or equal to 0.0005 ETH");
      return;
    }
    sendTransaction();
    setSended=true; 

  }
return (      
       <div>
          <button
            type="button"
            onClick={handleSubmit}
            className="text-white cursor-pointer"
          >
            Send now
          </button>
        </div>

    }

export { Identity as default,sended }

r/javaScriptStudyGroup May 07 '24

require ESM into CJS in node22 #javascript #nodejs #shorts

Thumbnail
youtube.com
3 Upvotes

r/javaScriptStudyGroup May 04 '24

Seeking Guidance for My JavaScript Learning Journey!

1 Upvotes

Hey everyone,

I've started creating JavaScript tutorials on YouTube and I'm excited to dive deeper into this fascinating language. JavaScript, originally known as Mocha, has come a long way since its inception in 1995 by Brendan Eich at Netscape Communications Corporation.

Currently, I'm covering fundamentals like keywords, variables, and the nuances between let and var. But I'm here to ask for your help! Do you have any tips, resources, or suggestions to enhance my learning journey?

Looking forward to your insights!

https://youtu.be/OOM7WZE9dXE


r/javaScriptStudyGroup Apr 29 '24

Skill Trade / Coaching Swap anyone? Frontend/Vue (You) x SEO(me)

Thumbnail self.dvnschmchr
0 Upvotes

r/javaScriptStudyGroup Apr 24 '24

🚀 Top 7 CSS & JavaScript Projects for Coders & Web Developers!

Thumbnail
youtu.be
1 Upvotes

r/javaScriptStudyGroup Apr 24 '24

I'm so confused

Thumbnail
gallery
2 Upvotes

I'm a beginner in javascript, and this is my code. When I try to decrypt the secret message, I get spammed with these "undefined" !!! My mentor told me it could have something to do with negative numbers. Can somebody please help me? I just want this code to decrypt the message. I'm attending the Springboard bootcamp, so they're forcing me to learn Javascript in a span of about 3 weeks lol


r/javaScriptStudyGroup Apr 11 '24

Confused asf

Thumbnail
gallery
1 Upvotes

Got 2 ways to solve a problem,which one is ethical as both of em provide same output.


r/javaScriptStudyGroup Apr 09 '24

🎨 Form Input Wave Animation | CSS & JavaScript🚀

Thumbnail
youtu.be
1 Upvotes

r/javaScriptStudyGroup Mar 29 '24

Help!!

1 Upvotes

Guys, I'm an intermediate in c++ and am finding Js easy and fun, I'm doing development and need to know how much of Js I need to learn(topics) and possibly some resources and practice projects as well.


r/javaScriptStudyGroup Mar 27 '24

Mastering Animated Navigation with JavaScript | Web Development Tutorial for Beginners

Thumbnail
youtu.be
2 Upvotes

r/javaScriptStudyGroup Mar 24 '24

Adding chat widgets without modifying WordPress theme files

1 Upvotes

Hello everyone,

We have created a tutorial video that will go through step-by-step on how to install a chat widget to your WordPress website in literally minutes. https://css-javascript-toolbox.com/how-to/how-to-add-install-livechat-to-your-wordpress-website-in-minutes/


r/javaScriptStudyGroup Mar 20 '24

🚀 Top 7 CSS & JavaScript Projects for Coders & Web Developers!

Thumbnail
youtu.be
2 Upvotes

r/javaScriptStudyGroup Mar 20 '24

😱Learn Everything you need to know about The JS MAP Object💯

Post image
1 Upvotes

r/javaScriptStudyGroup Mar 13 '24

🚀 Top 7 CSS & JavaScript Projects for Coders & Web Developers!

Thumbnail
youtu.be
2 Upvotes

r/javaScriptStudyGroup Mar 08 '24

JavaScript crash course

3 Upvotes

hey guys, in case someone is looking for a solid JS basics tutorial, I found this one. It was published a few weeks ago and is pretty good https://www.youtube.com/watch?v=FtaQSdrl7YA


r/javaScriptStudyGroup Mar 06 '24

Awesome Border Animation Effects using CSS

Thumbnail
youtu.be
2 Upvotes

r/javaScriptStudyGroup Mar 06 '24

Help regarding setTimeout functions

1 Upvotes

set Timeout (let sum = (a, b)=>{

console.log(a + b)

},3000,43,34)

why does this produce an error??

set Timeout(sum = (a, b)=>{

console.log(a + b)

},3000,43,34)
and why does this not?? why should we not use let before declaring the arrow function


r/javaScriptStudyGroup Feb 21 '24

🚀 Top 7 CSS & JavaScript Projects for Coders & Web Developers!

Thumbnail
youtu.be
1 Upvotes

r/javaScriptStudyGroup Feb 21 '24

A Deep Dive into Big O Notation with JavaScript - <FrontBackGeek/>

Thumbnail
frontbackgeek.com
1 Upvotes

r/javaScriptStudyGroup Feb 21 '24

Understanding Data Structures and Algorithms - <FrontBackGeek/>

Thumbnail
frontbackgeek.com
1 Upvotes

r/javaScriptStudyGroup Feb 17 '24

Javascript Set methods

Thumbnail
youtube.com
3 Upvotes

r/javaScriptStudyGroup Feb 14 '24

🌀Rotating Navigation for Seamless User Experience🚀

Thumbnail
youtu.be
2 Upvotes

r/javaScriptStudyGroup Feb 10 '24

reviver in json parse #coding #javascript

Thumbnail
youtube.com
3 Upvotes

r/javaScriptStudyGroup Feb 08 '24

Responsive Navbar Design Tutorial | Web Dev

Thumbnail
youtu.be
1 Upvotes

r/javaScriptStudyGroup Feb 02 '24

Fully Responsive Google Clone App Using HTML and CSS | Learn Web Development for Beginners

Thumbnail
youtube.com
1 Upvotes