ConnorFTW / discord-bot-creator

Create your Discord bot in less than 30 minutes.
https://discord-bot-creator.app/
Other
20 stars 5 forks source link

(JS-0417) Avoid `.bind()` or Arrow Functions in JSX properties #19

Open m5x5 opened 2 years ago

m5x5 commented 2 years ago

Description

A bind call or arrow function in a JSX property will create a brand new function on every single render. This is bad for performance.

Occurrences

There are 40 occurrences of this issue in the repository.

See all occurrences on DeepSource → deepsource.io/gh/Michael55555/discord-bot-creator/issue/JS-0417/occurrences/

m5x5 commented 2 years ago

@rajoriaakash This is probably just what you're looking for 😄

rajoriaakash commented 2 years ago

Thank you so much I'll surely look into this

rajoriaakash commented 2 years ago

Hi, ugh what exactly am I supposed to convert the arrow functions into? I tried replacing some of them with just a normal function call but then the bot is just stuck on a grey screen :( ...If you could help a little :)

m5x5 commented 2 years ago

Sure, feel free to commit your changes so I can take a look at them and help you 😃

rajoriaakash commented 2 years ago

Thanks, i just posted a PR about it. #26

m5x5 commented 2 years ago

Hey @rajoriaakash, how's it going? 😃

rajoriaakash commented 2 years ago

Really sorry but I'm busy with my college exams coming up so I ain't been having the time to look up to this :( . You can assign it to someone else if it's important to be done soon.

m5x5 commented 2 years ago

Alright, it's not too important as it's just some changes in the codebase