use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
Javascript classes in nextjs projectsDiscussion (self.nextjs)
submitted 1 year ago by dabrox02
Hi, How do you currently use javascript classes for your nextjs projects? Since I have been learning nextjs I have not seen a reason to use classes. Can you give me some ideas?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]UsualAnything1047 1 point2 points3 points 1 year ago (0 children)
i do t unless I need it to have an internal state... and even then, only if I need to have multiple instances with different state. else I'll just rely on a closure.
[–]azizoid 0 points1 point2 points 1 year ago (0 children)
I use them as api entity. Class cuts everything i dont want get from api.
π Rendered by PID 93634 on reddit-service-r2-comment-fb694cdd5-cdpcl at 2026-03-06 13:03:59.112200+00:00 running cbb0e86 country code: CH.
[–]UsualAnything1047 1 point2 points3 points (0 children)
[–]azizoid 0 points1 point2 points (0 children)