Questions tagged [reactjs]
The reactjs tag has no summary.
130 questions
-4votes
0answers
50views
Roll Based Web App [closed]
I'm gonna implement RBAC (roll-based-access-control) and I'm not sure how to do this. But I'm sure I don't need to make several pages (namespaces) for each role, such as admin/index.jsx, manager/index....
0votes
1answer
62views
Singe Page Application for the Web with (dynamic) tabbed interface - is there need for the navigation and url update for ERP application?
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) ...
1vote
0answers
81views
Deciding between two design alternatives for displaying series of screens in mobile applications?
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 ...
0votes
0answers
83views
Edge Case For Cookie Based Token Management
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 ...
1vote
3answers
238views
Does ReactJS Compound Pattern violate the DRY principle?
Let's say we have this component: const Card = ({ title, description, price, tag, category }) => { return ( <div> {title && <h5>{title}</h5>} {...
-1votes
1answer
403views
ReactJS hook vs utility function
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 ? '' :...
0votes
0answers
91views
Best Practices for Managing State in React Applications
I'm currently developing a web application using React and I'm looking for the best practices for managing state effectively. I've come across several methods such as using the Context API, Redux, and ...
1vote
1answer
617views
Deciding between logic on the front-end or back-end
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 ...
0votes
1answer
309views
Is it a good idea to serve a Single Page Application as a static site?
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 ...
0votes
1answer
220views
Monorepo dilemma: Where do you store your common business logics?
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 ...
1vote
1answer
753views
How could I apply the strategy pattern to a react component? [closed]
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 ...
0votes
1answer
160views
How to actually use global state in React?
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 ...
-1votes
1answer
165views
Best approach to communicate C++/Python and Front-End
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 ...
1vote
3answers
2kviews
Best strategy to push client-side updates to server?
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. ...
-2votes
1answer
239views
Is it OK to stick with object graph in React State and should I make helpers for handling it?
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 ...