Questions tagged [react.js]
React is a JavaScript library for building user interfaces. It uses a declarative paradigm that makes it easier to reason about your application and aims to be both efficient and flexible.
549 questions
0
votes
0
answers
47
views
Remove error from Inputfield when user input value in field in React
After submission if there are any error, on user inputfield typing wants to remove that error.
My Approach.
...
1
vote
1
answer
124
views
React TODO list component
The code makes unnecessary API calls because there are two useEffect hooks that both fetch data. The first useEffect runs on mount and fetches data for page 1, while the second useEffect runs whenever ...
5
votes
4
answers
217
views
JSX render method in react
The following is a piece of code which works fine, but somehow it looks a bit odd to me to have a function inside a render method and use it in both conditions. Let me know how can I improve this ...
2
votes
0
answers
52
views
React modal form implementation for name, image and weather
I'm building a modal form in React. It collects a name, image URL, and weather selection. It works, but I’d like to improve:
Code structure
State handling
Reusability
Accessibility
Here’s the code:
<...
2
votes
0
answers
57
views
Vite ReactJS Case opener
I build project Case opening simulator in React JS + tailwind.
I am looking for maybe another way to implement the structure of code and tell me if I've done something wrong, what I should do better ...
0
votes
1
answer
151
views
Cleaner way to write ReactJS component
My code is as follows :
...
6
votes
2
answers
4k
views
Reactjs Tab Component
I made a simple bare bones Tab component, i'm a beginner when it comes to ReactJS so any advice regarding the codes functionality is greatly appreciated.
Tab.js Component
...
6
votes
3
answers
6k
views
Best way to retrieve music metadata from audio files?
I am using the music metadata-browser npm package to retrieve audio metadata from files. This library is being used in an Electron and React desktop app.
To get the metadata of audio files, (and add ...
0
votes
0
answers
42
views
Fully animated React reorderable list
I've been playing around more and more with React recently, and wound up wanting to create a fully animated reorderable list. You can get idea about what it looks like here.
It's a self contained ...
1
vote
0
answers
55
views
Typescript robust Fetch wrapper with Retry and Error handling
I am building a TS wrapper around the fetch that adds automatic retries for certain errors. The error handling using a custom ApiError class and maps various error ...
2
votes
1
answer
61
views
React + Typescript Grid Traversal
Been learning some react and typescript and wanted to get some feedback on this small project I did. Feel free to be as nit-picky as you like.
...
3
votes
0
answers
56
views
React section toggle with single active panel
I’ve built a working animated panel menu in React using Framer Motion. Only one section expands at a time, making the animation smooth and visually clean.
However, I’d like help improving or ...
2
votes
0
answers
174
views
Very basic React toDo-List
After learning a bit React in the last weeks I've decided to make a toDo-list.
I've got the basic-functionalities (create, update, delete entries) finished.
I'm going to enhance the app with a ...
3
votes
1
answer
15k
views
React beginner exercise: Build a base arithmetic calculator
Exercise assignment:
Build a calculator with React which can add, subtract, multiply and divide.
See image below for reference
Give it whatever design and colors you want
Each text ...
0
votes
0
answers
32
views
Using react refs to control debouncing behaviour
I am learning about refs by using the React learning resources and encountered this challenge: https://react.dev/learn/referencing-values-with-refs#fix-debouncing
The provided solution uses a ref to ...