Skip to main content

Questions tagged [reactjs]

Filter by
Sorted by
Tagged with
3 votes
1 answer
246 views

I'm building a web app using Spring Boot (backend) and React (frontend). My authentication is based on JWT, with both access token and refresh token. The refresh token is stored in an HTTP-only ...
Conquer the world's user avatar
84 votes
6 answers
25k views

Why do many software developers violate the open/closed principle by modifying many things like renaming functions which will break the application after upgrading? This question jumps to my head ...
Anyname Donotcare's user avatar
28 votes
13 answers
10k views

As a programmer I have found my code frequently elicits the reaction "I don't understand". Whenever I get this response I try my best to explain my code patiently, and not make anyone feel ...
yeerk's user avatar
  • 500
1 vote
1 answer
96 views

I am developing React SPA ERP application (so - no SEO requirement) with dynamic tabbed interface - where each form (e.g. invoice id=1, invoice id=2, invoice new, list of invoices, accounting report) ...
TomR's user avatar
  • 1,029
1 vote
3 answers
255 views

Let's say we have this component: const Card = ({ title, description, price, tag, category }) => { return ( <div> {title && <h5>{title}</h5>} {...
Oki's user avatar
  • 117
1 vote
1 answer
994 views

Before I begin, I want to say I am very new to this and I am a junior but also solo developer with no seniors to ask for guidance. Please feel free to explain to me that I am not approaching it ...
Zayd_MP's user avatar
  • 13
-1 votes
1 answer
627 views

Should we use utility functions in react or should everything be components and hooks? I had this scenario: Utility function for formatting money. const formatMoney = (value) => value == null ? '' :...
Oki's user avatar
  • 117
1 vote
0 answers
95 views

I am developing a mobile application, and one of the features is a "story" that is essentially a series of screens. The screens can be of three main templates: A "video" template ...
AbduAdd's user avatar
  • 19
0 votes
0 answers
103 views

I have a React frontend and a Nodejs backend that uses authentication via an OIDC service provider. After a user goes through the SSO authentication flow I store the token (containing a refresh token ...
John's user avatar
  • 9
0 votes
1 answer
465 views

I've built a small single-page web application in React and seen that it's possible to serve the app as a static site on something like S3. Previously, I considered using Nginx, but as this is lower ...
Connor's user avatar
  • 159
1 vote
3 answers
2k views

I'm just starting to build a web app using React.js, Next.js, Prisma, & PostgreSQL. In this web app, users can create "projects", which are represented by 10-15 rows in the database. ...
BurstWizard's user avatar
0 votes
1 answer
275 views

In my current monorepo structure for frontend, this is how it looks: apps\ jira\ confljuence\ packages ui utils\src (contains common utils like useDebounce.ts, isEmptyObject.ts, etc.) From what i ...
nishant_boro's user avatar
-2 votes
1 answer
262 views

I am trying to build ERP application using React frontend and I have not found decisive answer whether to use object graphs in React state? E.g. I would like to build Invoice view and I have the ...
TomR's user avatar
  • 1,029
1 vote
1 answer
862 views

For the following component, how would I extract the unit logic to allow for composition? In my actual app I am trying to reduce the amount of logic encoded in the component and I have decided that ...
Tyler Kasper's user avatar
0 votes
1 answer
184 views

In my company, all of the projects use at least some kind of global state library like Redux and MobX. However, the actual usage is limited to storing fetched data, and it lacks any caching logic or ...
Erick Christian's user avatar
49 votes
7 answers
7k views

I am part of a consultant team implementing a new solution for a customer. I am responsible for the majority of code reviews on the client-side codebase (React and javascript). I have noticed that ...
Andreas Warberg's user avatar
4 votes
2 answers
1k views

What exactly is the purpose of React JS? I've heard a few things, like: It updates the page without refreshing. It is modular and can reduce redundant coding. It is faster than updating the DOM ...
Kenneth Dang's user avatar
30 votes
5 answers
13k views

React.js provides JSX as an XHTML-like syntax for constructing a tree of components and elements. JSX compiles to Javascript, and instead of providing loops or conditionals in JSX proper, you use ...
wrschneider's user avatar
  • 1,369
0 votes
1 answer
286 views

I'm following the guide in https://reactjs.org/docs/thinking-in-react.html which makes sense for data that I request and update on a filter. However, I want to have some sort of general ...
Archimedes Trajano's user avatar
0 votes
3 answers
4k views

I'm working on an application with a database containing many recipes. The API is written in Django (with Django REST Framework) and frontend in React.Each recipe is assigned a high-quality image. In ...
gandalf113's user avatar
1 vote
2 answers
3k views

I have a very big form - let's call it <MyForm> - consisting of the following: text fields and dropdowns custom selector made of selectable cards table input (for this example 50 rows with each ...
Hans's user avatar
  • 121
4 votes
1 answer
1k views

As all articles say the Virtual DOM is lightweight and allows us to update only those nodes that has to be updated, unlike the real DOM that updates the whole nodes structure. So the first question: ...
devdevdove's user avatar
0 votes
1 answer
251 views

An issue I find myself having with code layout in my React components is that I end up having to define too many handlers. I generally write only functional components with hooks, but within the body ...
temporary_user_name's user avatar
-1 votes
1 answer
201 views

I work with Computer Vision applications, mainly in Python and C++. Recently, I get involved with a customer that wants to create a UI based on React JS to visualize the results of our software in ...
mbenencase's user avatar
-1 votes
1 answer
117 views

Outline of the current architecture of our web app outlining the issue I'm seeing Client-side app is React, talking to a server running the Play! framework via an API. On the page is a table that ...
bluedevil2k's user avatar
5 votes
1 answer
466 views

I want some advice regarding my architecture and hosting options. I'm attempting to build an e-commerce site for e-books. It will use NestJS for the backend and ReactJS+Typescript for the frontend. ...
Ketra's user avatar
  • 51
0 votes
1 answer
635 views

Abstract I'm trying to figure out a solid, scalable, clean and practical architecture for react projects. As a a playground I have a project with two Screen and a JSON server. When I try to apply a ...
DarkTrick's user avatar
  • 286
0 votes
1 answer
149 views

Say I have a ReactNode post: const Post = (props:{content:string}) => { return( <div> {textProcessor(props.content)} </div> ) } the role of textProcessor is to 1. to ...
Leftover Salad's user avatar
0 votes
3 answers
245 views

Ok I have a bunch of components that all have the same logic but have different css classes. So I wanted to create a sort of factory function that takes the names of the classes as its argument and ...
kaan_atakan's user avatar
1 vote
1 answer
657 views

Context When designing the API of a React component, you may decide to receive props in a more semantical way. Here's a simple example <Modal headerTitle="foo" /> vs <Modal> &...
Christopher Francisco's user avatar
4 votes
2 answers
5k views

In React, when rendering a mapping from elements of a list/array/iterable to React elements, we're required to attach a locally-unique key to each element. Generally this is so that if an element ...
dx_over_dt's user avatar
4 votes
1 answer
2k views

The motto of the upcoming question is "I don't know what I don't know". I would like to know if there are downsides or security risks with an authentication implementation. Right now, I'm ...
Bennett Dams's user avatar
12 votes
3 answers
16k views

Title says it all. Can't seem to find what is most common out in the world. I'm brand new to programming. If the answer is "it depends", I would love to know what it depends on. Here to learn.
Will's user avatar
  • 133
0 votes
0 answers
139 views

I am pretty new to Clean Architecture / Onion Achitecture, I actually not sure if the 2 terms are exchangeable. So it pretty clear to me, considering is a few days I am reading and study about it. It ...
Carmine Tambascia's user avatar
0 votes
1 answer
486 views

I have an old php web application, with very bad code. While a lot of it just has html and ajax calls in the, the wrapper is still php. I want to develop the new modules in react, and slowly replace ...
Dushyant Bangal's user avatar
13 votes
3 answers
7k views

I'm actually studying the flux pattern and there's something that I can't understand concerning the stores. What are they exactly? I have read many articles, and it seems that it concerns the ...
mfrachet's user avatar
  • 1,591
1 vote
2 answers
463 views

I am designing a timesheet app for logging user tasks using React for frontend and Django REST Framework for backend. The database is PostgreSQL and I have a table for recording the tasks with 4 ...
Alvin's user avatar
  • 19
1 vote
2 answers
625 views

I have a pull request and this pr is being reviewed by co-worker. Context I'm using React and a specific component has ternary operator within component like below. const ExampleComponent = (): React....
undefined's user avatar
  • 131
0 votes
0 answers
114 views

Goal We have an app with different articles. I want to cache an article when the user has read it, but make sure that I display the latest data. I came up with this hook: React.useEffect(() => { ...
Gh05d's user avatar
  • 101
0 votes
1 answer
278 views

Backstory: My new employer has Dynamics CRM on-prem and it is used by all office staff and other colleagues that are consultants. All other employees are a working force out on various construction ...
MrDim's user avatar
  • 1
0 votes
1 answer
98 views

I'm attempting to create a project to increase and enhance my coding skills, and I've lately migrated React to Nextjs. I've noticed that NextJs' main point or strength is rendering; Could someone ...
Mohammad Khan's user avatar
1 vote
4 answers
661 views

I'm a React developer at a large company working on an enterprise application which draws on a large amount of data, but performs a very specialized task and has only a handful of internal users. The ...
Rutherford Wonkington's user avatar
-2 votes
2 answers
1k views

I have a React App (created via create-react-app) secured with OAUTH2. Currently all dynamic content is via REST APIs, secured with the same OAUTH2 token issued at login. It is hosted on AWS. I want ...
Kevin's user avatar
  • 19
5 votes
3 answers
653 views

So we decided to redo UI of our web application in React. Six months down the lane and we have a complete mess of components and reducers and thunks and actions and god knows what not. We have ...
lahory's user avatar
  • 315
0 votes
1 answer
310 views

I am working with a very large SQL database through a frontend reactjs application with a node server intermediary using an ORM for query sanitation. However due to the size of the DB it takes some ...
WesternWarrior's user avatar
-1 votes
1 answer
4k views

I am building travel blog using React as frontend Javascript framework along with GraphQL. I am doing this project by myself as a pilot test and I am currently in a phase of translating photoshop ...
Bip's user avatar
  • 109
24 votes
1 answer
12k views

The Redux framework favors immutable state/pure function paradigm, which promotes creation of new state from the previous state in terms of the current action. The applicability of this paradigm is ...
Stephen Isienyi's user avatar
0 votes
3 answers
1k views

So I'm currently playing around with web development as a project, and I've been looking at React recently. My current issue is that I'm having trouble distinguishing between front and back end ...
B.Iguana's user avatar
2 votes
0 answers
2k views

I have some deeply nested react components. Let's limit them to 3 levels of nesting and call them Parent, Children and Grandchildren. The state for the entire app is stored in a single object in the ...
Irfan434's user avatar
  • 187
-3 votes
1 answer
428 views

Suppose there's a root <App /> which houses multiple components, one of them being, say <SearchBox />. App component houses the app state (such as searchResults array) and iterates the ...
McDerp's user avatar
  • 75