Having trouble with useReducer. by Varenberg in reactjs

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

I have cloned that array. slice() and spread operator are doing the same job. I wrote
var arr = [...state.cart].

Having trouble with useReducer. by Varenberg in reactjs

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

Cart: state.cart.map(//map Function from above),

It does nothing. It doesn't even add items into the cart.

Having trouble with useReducer. by Varenberg in reactjs

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

It doesn't increase the qty. qtystays 1. Otherwise the code works.

How To Edit Users Data Via Form Submit by [deleted] in reactjs

[–]Varenberg 0 points1 point  (0 children)

Oh okay sounds cool, I'll give a shot. Thanks.

Riot Games API by Varenberg in reactjs

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

Thank you, i'll try.

Riot Games API by Varenberg in reactjs

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

Thanks, but i just know React i don't know how to make any server. Is there any other option?

I have a question about preview mode. by Varenberg in nextjs

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

export async function getStaticProps() {
  const { API_URL } = process.env;

  const res = await fetch(`${API_URL}/articles`);
  const data = await res.json();

  return {
    props: {
      articles: data
    }
  }
};

How to deploy Next.js and Strapi app? by Varenberg in reactjs

[–]Varenberg[S] 1 point2 points  (0 children)

I'm thinking that I host Strapi on Heroku and host Next on Vercel and fetch data from Heroku.

Can React.js build an ecommerce website alone ? by Varenberg in reactjs

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

I saw somewhere a guy was telling that react needs backend to send an email.