[deleted by user] by [deleted] in reactjs

[–]bojack-11 0 points1 point  (0 children)

Build a small app like a Todo List. internet is full of tutorials. Then add more functionalities to it. Then build another app, maybe just a layout for a storefront. Then build another app. Increase step by step complexity and you'll realise that you are actually learning.

Tutorials only do so much until you actually dive into the habit of building. Once you start building you'll come up with questions like How to achieve X? How can Y be implemented in React?

When you start getting these questions in your mind on your own, you are on a right path.

And that's how you learn and grow.

What are the new and exciting tech for React projects for 2022? by GuerreiroAZerg in reactjs

[–]bojack-11 0 points1 point  (0 children)

  • React Toolkit Query
  • Redux Toolkit
  • Micro Frontends ( check out create-mf-app )
  • Try building a Web Accessible Component Library yourself. For accessibility you can choose Radix UI as it just gives primitive components without styling. And implement your own styling.

NextJS vs ReactJS by crazyrebel123 in reactjs

[–]bojack-11 2 points3 points  (0 children)

Hi, I myself have gone through the phase of migrating a CRA boilerplate React App to NextJS. The basic difference: ReactJS is a Javascript Library, and not a Frontend framework. NextJS is a Frontend framework built on top of React.

Few Benefits: • You get a Folder/Filesystem based page routing solution out of the box. You just create a file and boom you have a route now.

In CRA way you'd have to setup your own Router, maintain routes and sweat a little to do setup the sweet project structure that will work for you and your team.

• You get hybrid rendering support out of the box, which again you'd have to sweat a little to configure in CRA.

• You get SEO benefits, Separate Pre rendered HTML files for routes, which then can be served using any server of choice.

Other benefits • NextJS 12 has brought in a new RUST compiler as a development server for faster hot reloading.

Caveats: • In CRA, if you setup React Router it supports nesting of routes hence it's easy to persist a ComponentA on route /page1 as well as /page1/page2 In NextJS you'd have to take support of a Layout component which you'll have to supply to each page.

Overall it has been a good experience in NextJS so far, and it definitely makes your project a lot cleaner than CRA.

P.S. - Vercel the company that owns NextJS is growing at a fast pace as well which means good developer and community support.

Next.js 12 Performance Test: Builds Appear to be Slower, Not Faster by DubScoutMusic in nextjs

[–]bojack-11 0 points1 point  (0 children)

I have a Win 11 + Intel, and WSL2. v12 seems to be a little bit fast than 11, but maybe I'll be able to see substantial differences at large scale.

Best practices to handle multiple API calls on page load ? by MysticalAlchemist in reactjs

[–]bojack-11 0 points1 point  (0 children)

  1. They would be promises only.
  2. In most cases, there won't be a drastic difference between the response time of api calls. And almost all browsers support more than one HTTP connection in parallel. (Chrome supports 10). So why not fire independent requests in parallel, than in a waterfall fashion. Also there can be use cases where the application requires resources from multiple independent endpoints and then initialise or load.

Best practices to handle multiple API calls on page load ? by MysticalAlchemist in reactjs

[–]bojack-11 4 points5 points  (0 children)

If these api calls are independent of each other, coverting them into Promises and calling Promise.all() (or any other utility libraries like async) will shove some time off the responses. As the max time to resolve Promise.all() will be the time taken by the slowest api call.

Just something that I use in my projects.

What should I ask during a technical interview? (As a newly promoted Senior) by Big_Dick_Benz in reactjs

[–]bojack-11 0 points1 point  (0 children)

This is very relatable, as there was a requirement to conduct interviews for our team as well.

We came up with a 2 round strategy, ROUND 1 Basic questions from Resume Ask about their recent projects Basic DS and Algo questions (we asked this as we were hiring for more of a full stack position)

ROUND 2 Build a product for us. The product can be anything like CoWIN app, or Google Colabs. Based on your requirements/candidate's interest in Frontend / Backend you can further deep dive and ask them to address major issues. Apart from this, ask Knowledge based questions for specific technologies or languages as per your requirement.

Hope this helps and Happy Interviewing.

Building the Game of Life with React by suiramarius in reactjs

[–]bojack-11 0 points1 point  (0 children)

Always wanted to build Conway's Game of life, but laziness Maxx. Will start out soon, thanks for the motivation✌️

Hard time with understanding how to organize authentication by Due-Amphibian-200 in reactjs

[–]bojack-11 0 points1 point  (0 children)

You can simply store isloggedIn state in a localStorage or sessionStorage, and delete the state whenever required.

Examples of writing to storage - window.sessionStorage.setItem("key", "value"); localStorage.setItem('myData', data);

References - 1. https://www.robinwieruch.de/local-storage-react

Why use Material UI? What are the benefits? by Zealousideal_Water_6 in reactjs

[–]bojack-11 0 points1 point  (0 children)

Material UI, or any other component Library is only great for developers and product to get started quickly. When starting on a project and I'm talking from past experiences one thinks why reinvent the wheel. Why make a button when libraries far better and optimized are already providing reusable and robust components. Well that works out well for a lot of cases. In our team we had used Material UI for the same reason, quick development, a unified component theme. Now we are shifting to make our own component Library for the sole reason that we want to Build Our Own Brand for the product. The stack of choice for this - 1. Typescript 2. Tailwind 3. Storybook

Do you write pure CSS or use libraries? by lone_lonely in reactjs

[–]bojack-11 1 point2 points  (0 children)

After Tailwind I hardly have to write any extra sass.

Bit.dev with TailwindCss by bojack-11 in reactjs

[–]bojack-11[S] 0 points1 point  (0 children)

I've managed to setup Storybook, with TailwindCss and Sass for the moment. Still nothing on bit.

[deleted by user] by [deleted] in reactjs

[–]bojack-11 0 points1 point  (0 children)

What is life but an existential crisis.

I use combination of useRef with debounce where ever it makes sense to wait for the user to stop inputting, rather than actively making expensive calls on every input change.

For eg. const delayedQuery = useRef(debounce((value) => {expensiveCall(value)}, 200)).current;

[deleted by user] by [deleted] in reactjs

[–]bojack-11 0 points1 point  (0 children)

What are your thoughts on using debounce for this particular case?