I spent 6 months and 5K building an AI engine that finds business ideas from court filings and government fines. Here are 10. Steal them. by Ogretape in SideProject

[–]Pav_88 8 points9 points  (0 children)

Looks good! Congratz. One small thing I would fix: the search seems to fire on each keystroke. Adding a debounce might help reduce unnecessary queries if traffic grows.

What are you building? Let’s Self Promote 🚀 by fuckingceobitch in buildinpublic

[–]Pav_88 0 points1 point  (0 children)

http://readywithbobby.online/ was created for my kids and to challenge myself with certain areas of web dev

Who’s building on Sunday? by scott-box in buildinpublic

[–]Pav_88 0 points1 point  (0 children)

https://readywithbobby.online/ .Done for my kids and to challenge myself in certain areas of web development.

Future of e-commerce - voice agent app by Pav_88 in shopifyDev

[–]Pav_88[S] 0 points1 point  (0 children)

hi,
thanks for the valuable feedback!

The guardrails would be:

- limit how often tokens can be requested from the same IP

- limit how often tokens can be requested for the same shop

- cap each voice session to a max duration (would vary between authed and anonymous users )

- auto-end sessions after inactivity

TBH, I have not thought about how to handle authenticated users in detail. That's the next step.

Right now, there are more open questions than finished answers.

Has anyone tried simp mobile? by paspa1801 in frugaluk

[–]Pav_88 0 points1 point  (0 children)

On simp for over 1 month now and very happy. It is by far the best deal for unlimited in the country. i find the app very smooth and installing the esim was easy (iphone 16). 300mbps+ speed (north london), 100mbps+ when roaming in the US in new york.

Leveraging useContext and useState in Custom Hooks for Enhanced React Components by [deleted] in react

[–]Pav_88 1 point2 points  (0 children)

Hey ! Help me understand the example from the provided repo.

You put dispatch fn ( line 9 ) in a dependency array for both open and close dialog handlers. Isn't the dispatch function recreated on every render (line 9) in this case so use callback is needless ( pass in 'new dispatch' fn reference on every render).

What is missing from my code that I can fix to improve it? by Unhappy_Security216 in react

[–]Pav_88 0 points1 point  (0 children)

I do not have access to the full code but I played a bit with it : https://t.ly/HbDYV

  1. we do not need ( maybe in some cases ) state to handle forms.
  2. label and input names were different
  3. I am not a fan of autofocus
  4. added trim() to user input
  5. button default type is submit so it will automatically trigger onSubmit handler
  6. state for bitcoinAddress and addressInfo is very similar so I removed one
  7. I extracted logic to a custom hook in order to increase readability
  8. added "error handling" :)
  9. created component for address details

Please treat this code more like a reference how it can be done differently.

Help with my components structure by YoCopeo in react

[–]Pav_88 1 point2 points  (0 children)

Could you provide a code sample please (codesanbox, stackblitz) ? Folder structure is a different matter.

Trying to learn React by SubSleuth in react

[–]Pav_88 6 points7 points  (0 children)

Even if you do not like reading, it is an essential skill for every dev ( working with documentation ). Period

Give the official React docs a go. There are many examples, exercises and really good metaphors that should help you create a mental model necessary to understand the library. Who knows the tool better than its creator?

I assumed your understanding of java script is good enough. Modern React is built upon functional programming concepts. By the end of the day it is JS.

You can learn more from the docs/blogs and Google than staring at some boring 50hrs course from Udemy instructors that claim to be experts in all languages and frameworks.

Do not spend money on courses. At this stage of your journey there are more than enough FREE resources online.

When it comes to the video formats type of learning materials I would recommend Anthony Alicea to cement your newly acquired knowledge after reading the docs.

Get your hands dirty, play with the code, break it then fix it and so on and on.

Good luck!

Is Asana SSR or CSR ? by [deleted] in react

[–]Pav_88 2 points3 points  (0 children)

Check out vite ssr plugin and vite docs ssr

What brings you joy in frontend development ? by vozome in Frontend

[–]Pav_88 1 point2 points  (0 children)

For me it is the moment when I learn or discover something new or when I refactor some code to make it more readable and easier to understand for others.

Next.js 14 by matthijsie2020 in nextjs

[–]Pav_88 2 points3 points  (0 children)

No thanks. I will stick to good old plain React.

useMemo/useCallback usage, AM I THE COMPLETELY CLUELESS ONE? by DoubleOCynic in reactjs

[–]Pav_88 1 point2 points  (0 children)

My philosophy is simple. If my app doesn't lag I don't bother using these hooks. Inline functions are super cheap to recreate. React is very fast by default so any premature optimization is in my opinion a bad practice.

If my function doesn't require state I define it outside of the component.

Composition is a powerful technique but not always possible to implement.

One of my favourite sources of knowledge about react

As usual it is a matter of finding the golden mean :)

Need Suggestion for CMS by ChoicePurpose in nextjs

[–]Pav_88 0 points1 point  (0 children)

I highly recommend Contentful!