menu

React

A community of developers, designers and others who love React.js. ⚛️

Channels
Team
Posts
Members
Info

Redux / useReducer "mutation"

Normally when writing a case I do: Obviously this can get very verbose as the state grows. I was wondering if there are any potentials with rewriting it as "mutation" vs the verbose new object creation way as so:

thumbsup
0
message-simple
5

Using react-l18n with Gatsby

I'm using react-l18n for the first time with my Gatsby site and am following this tutorial: https://www.gatsbyjs.org/blog/2017-10-17-building-i18n-with-gatsby/ The translations aren't working how they are suppose to. The tutorial seems to be using classes while I have functional…

thumbsup
0
message-simple
1

I have to change static /js/css path after - npm run build

I build a react app using CRA. In deployment, we have different static servers to maintain js/css files. So I have to change static URLs after the build(npm run build). For example, in .env.staging I set, …

thumbsup
0
message-simple
1

How to initialize analytics code once and use later

What is the best way to initialize analytics like google analytics, branchio, fb Analytics, countly

thumbsup
0
message-simple
1

Need help in going back to home page when an internal page reloads.

I am using performance object to make an alert that the data is lost, as follows: if(window.performance){ if(performance.navigation.type === 1 && performance.navigation.type !== 0){ …

thumbsup
0
message-simple
6

Modular or atomic folder structure

Hey, anyone here already tried to organize their react project folder structure in a atomic or modular way? if so, can you share an example or a github repo with it implemented? thank you

thumbsup
0
message-simple
3

Should I learn Vanilla Javascript First?

Dancing between vue and react I realized my fundamentals were off and my progress irregular, this feeling made me think about starting over HTML, CSS and javascript, its gonna take longer but I feel is the right call. Am I taking the right approach? Should I master vanilla…

thumbsup
1
message-simple
4

Error in UseEffect

Hi, tell me, why am I getting an error? I Use React (useReducer, useContext), TypeScript. I use UseEffet as an analog ComponentDidMount, I load data there and carry out calculations. …

thumbsup
0
message-simple
1

How can I make a virtual Currency?

I'm working on a e-commerce site but my products are credit based, meaning I cannot implement normal payment options. I cant seem to find resources on how to build a virtual currency on my store. Does anyone have any resources o guidance?

thumbsup
0
message-simple
2

How to create refs for items in a loop using useRef?

I know the value of the ref can be an array but don't know how or where children should be added to the array. I've tried pushing them in the body of the component but that means every render more are added. Here is a really simple sandbox illustrating what I'm trying to…

thumbsup
0
message-simple
2