Questions tagged [jsx]

JSX is an open source programming language, or an AltJS with classes and static types. The source code is compiled into JavaScript which is highly optimized.

Filter by
Sorted by
Tagged with
-1 votes
0 answers
15 views

Sign up and Sign in components for React application

...
user avatar
  • 205
0 votes
1 answer
25 views

Zodiac sign component for a React.js astrology project

I'm working on an astrology project, and I have a component for each sign: ...
user avatar
1 vote
1 answer
32 views

Theme handler with React

I've just created a theme handler with React.js. Could my Theme component be polished and improved a bit ? ...
user avatar
1 vote
1 answer
36 views

Multiple grouped value select component

I've been designing a React component to select countries that a user has visited, grouped by continent. This component is a part of larger project but is relatively self contained. This is my first ...
user avatar
  • 63
1 vote
0 answers
43 views

Drag-and-drop file upload component

I've tried to make a custom file upload input. The goal was to just have a nicer looking file input compared to its unaltered version. One thing I don't like is the CSS. I don't like altering the ...
user avatar
1 vote
0 answers
23 views

ReactJS low re-rendering performance of the component

First of all, for explaining the issue better and avoid pushing long code here, I'll post the links of the files from repository. I have a feature simulation of the game that I am making a tools/wiki ...
user avatar
2 votes
1 answer
268 views

React app that uses hooks and shows a random image every two seconds

React beginner here. I'm practicing state and hooks, and I wanted to create a small app that every two seconds fetches an image URL from a service (that returns random images) and shows the returned ...
user avatar
  • 145
1 vote
0 answers
15 views

Using React Native to implement Conway's Game of Life

I'm using React Native to implement Conway's Game of Life as a mobile phone app. So far I've implemented the game logic and a main screen with an embedded GLView component where the game board is ...
user avatar
  • 31
2 votes
0 answers
62 views

Carousel in react

I implemented this carousel component in react: ...
user avatar
  • 21
1 vote
1 answer
42 views

React - Component rendering weather data

Background: Hello, I'm a student (since 2 months) and I've created a small MVP of a weather application. So now I'm refactoring my code because it looks hideous and it is hard to work with. The ...
user avatar
2 votes
0 answers
36 views

To-do application in React

I am new to react and I tried to implement a TODO application using react state and props. I need somebody to just review the code and suggest improvements in the code. Currently I have not added any ...
user avatar
0 votes
0 answers
14 views

Implementing Reddit-like comment links

I tried to recreate Reddit's functionality of replacing r/* on a comment with a link to the subreddit and I came up with this: ...
user avatar
0 votes
0 answers
894 views

Pagination component using React and Chakra UI

My Pagination component provides buttons: 5 around page (i.e: if current page is 3, then it will show button page 2 3 4 5 6) Prev/Next page Button to last page ...
user avatar
0 votes
1 answer
52 views

React code that controls user permissions

I have this code that controls the user permissions provided to a user. In my case, I constructed a simple example of CRUD. When the admin checks the boxes, it will grant the user access to perform ...
user avatar
2 votes
0 answers
38 views

Proper way of using redux and props

I made a weather app in react and redux for an interview. The response was that I didn't use redux properly, and that it has unnecessary props. I'm not sure what they meant. The app is on github https:...
user avatar
  • 21
3 votes
0 answers
64 views

Cryptomarket data visualization

For a hobby project I want to visualize the current crypto market in bubbles. The idea is to clone cryptobubbles.net. I've already made a prototype at the moment, but the frames are on the low side. ...
user avatar
0 votes
1 answer
37 views

Check in/out cards

putting the if-else block outside of a function looks clutter to me, should I just put it inside a function and then inside the useEffect ? Purpose of the if-else block: Render the cards base on the ...
user avatar
  • 101
1 vote
0 answers
21 views

Typescript React-Native Component Dimension Hook

I did a lot of research trying to find a React Native component which could reference its own dimensions in order to scale different elements in its style, but could not find any solid examples. I ...
user avatar
0 votes
0 answers
11 views

Passing global state and state-modifying functions to child elements in a React app

I'm only three days into React, so please forgive my ignorance. I'm working on an application in which you can design something consisting of various parts. The interface has a list of items in one ...
user avatar
0 votes
1 answer
209 views

React - Display current time using useState, useEffect

I am learning about hooks, so I try to write code that display current time. I had comment in each line of code the reason I write it. So: Am I understand right? Is there any bad practice? What need ...
user avatar
0 votes
1 answer
109 views

Listing the range from A-Z with special characters in JSX

For generating a list of characters, I currently use a static list, 2 components and some unclear conditional renders. ...
user avatar
  • 719
4 votes
1 answer
115 views

Reduce multiple re rendering of components in React

Following is my working application that contains a Search Container, a Sorting Container and a listing Container. Based on Search and Sort the listing data changes in the listing container. The ...
user avatar
0 votes
0 answers
22 views

Setting a complex component via useEffect and useState?

I have a component that I am updating from running a plain function on every render, to one that only runs when some components update: ...
user avatar
0 votes
0 answers
28 views

React component to display emojis from different sources

I'm looking forward for any feedback to help improve in any way this React component that will render an emoji from GitHub, Twitter or OpenEmoji: ...
user avatar
0 votes
0 answers
140 views

Obfuscate email React component

I've written this Email component which obfuscates the email until the user hovers over it: ...
user avatar
0 votes
0 answers
17 views

nested drop down for blog posts

I wrote this component to be a drop down for blog posts. The index prop is a PostIndex object returned from a query in the ...
user avatar
1 vote
1 answer
35 views

React component with axios calls

...
user avatar
  • 205
2 votes
1 answer
39 views

ReactJS link with conditional CSS classes

I'm starting to learn React/NextJS and find the way to write conditional CSS very ugly compared to VueJS. I'm curious if someone could look over this code snippet and guide me in the right direction ...
user avatar
  • 153
0 votes
2 answers
67 views

React Native screen to add a city to a weather app using a REST API

In a recruitment process, the company gives me a project to do in react native. I finished all the tasks. But company gave me a feedback and said that your project was good, but you did not apply best ...
user avatar
4 votes
0 answers
59 views

React - Show more and search functionality

I created a rough implementation of a component that lists stuff based on data has the option to enable searching for that data. I've not used React all that much so it's probably a terrible way to ...
user avatar
2 votes
0 answers
27 views

File Picker Component - React

Created FilePickerComponent recently. I'm new to React/Web development. Could you please help reviewing this code - ...
user avatar
2 votes
0 answers
280 views

Create a map where countries can be selected using react-leaflet

I've only just started learning javascript and decided to try and make a simple app where individual countries can be selected, highlighting them, and the name appearing in the top corner. The code ...
user avatar
  • 63
2 votes
1 answer
40 views

Show react component given a condition

I want to show the battery icon given the status provided in props. I am trying to keep it simple but without writing too much code, i.e.: . ...
user avatar
  • 301
3 votes
1 answer
51 views

Simple registration form with validation

I am really new to React and I worked on some challenges. I need to mention I did most of the stuff on my own without much dependence on the internet beside what functions do. I'd like to know if I ...
user avatar
  • 31
2 votes
1 answer
51 views

React component to render price change

I've written this Card component which is composed of thumbnail image, name, symbol, ...
user avatar
  • 123
0 votes
1 answer
103 views

This code renders a time dilation calculator

I've been learning React for about a month now. I wrote a small interactive calculator to show the effects of time dilation under special relativity. It's Node/React/Razzle(for SSR)/Typescript/...
user avatar
2 votes
1 answer
206 views

Created a basic User Profile List using an API (React)

I'm relatively new when it comes to programming in React and in JavaScript, but have a surface level understanding of what things do. I've created a basic program that fetches user data from an API ...
user avatar
1 vote
1 answer
31 views

Dynamic social media component w/ dark mode

Note: This is my first post for a code review, so any feedback on what other info would be helpful to post (if any) would be much appreciated! React component: Social.js The component has an input of ...
user avatar
0 votes
1 answer
49 views

Merge into an object from two different API calls

I'm working on an app to compare SDKS (their churn and acquisiton rates). I have created an API with two separate endpoints. The first, compares one sdk to ther other and spits out that data for each ...
user avatar
  • 231
2 votes
2 answers
31 views

Display element in a grid and conditionally add to redux or remove if not selected

I have some logic on my JSX for an element in a grid, if element is selected, then add to redux, if element is not selected then remove from redux... is working ok, but I sense a bad smell... ...
user avatar
2 votes
1 answer
65 views

React component to display a budget summary

I have following component ...
user avatar
3 votes
1 answer
86 views

How can I re-write the conditionals for this button

I've been trying out React for a couple of days and I tried to build a button component with some conditionals. Everything works but I feel like I am not doing it the right way. Could anyone review my ...
user avatar
  • 31
2 votes
0 answers
141 views

naming convention for atomic design

We follow atomic design principle. More here I have a react app where we put small components like button, label etc and call it atoms. In that I have made loading and Error component responsible for ...
user avatar
3 votes
0 answers
127 views

React Higher Order Components - export wrapped component or wrap it in parent?

I've been learning about about how to use context, and how to make a higher order component to provide context values through props. So, I've created my HOC to pass down the props, and it looks like ...
user avatar
  • 219
6 votes
1 answer
181 views

Hacking Minigame

I made the UI for the hacking minigame from the Fallout series. Could I get some feedback on the main Game.js component? It's my first React app. I'm especially ...
user avatar
3 votes
3 answers
102 views

JSX render method in react

Following is the piece of code which is working fine, but somehow it looks bit odd to me to have a function inside a render method and using it in both conditions. Let me know how can I improve this ...
user avatar
  • 145
2 votes
2 answers
33 views

Profile with static and input modes (View and Update)

I'm a solo developer and a friend told me that my code is not very readable. I always write code trying to keep it DRY while not taking longer than it would take doing it in an "easier" way. ...
user avatar
4 votes
1 answer
38 views

React avoid code repetation

I was working on a react hooks project. I was making a form In the form, I noticed myself writing a very wet code Here is my code ...
user avatar
3 votes
1 answer
60 views

React/Redux/Node/Express crud application with a React class component

https://try.gitea.io/nadal/repository Used this in a coding challenge after a job interview. I didn't get chosen, but I was wondering if it was because of the code quality in the project. ...
user avatar
  • 31
2 votes
0 answers
34 views

Multi Selection Component (React + Hooks)

all. This component is meant to take in an array of available options and provide the user an easy way to choose multiple options. Each time the selected options are changed/updated, those options are ...
user avatar

1
2 3 4 5