Skip to main content
Filter by
Sorted by
Tagged with
1 vote
0 answers
149 views

I have a register/login page where i check for the user id in the redux state, after a successful login or register , the NotFound component flashes before redirecting to the home page. login page ...
Mohammad's user avatar
-1 votes
1 answer
950 views

I am dealing with search parameters and redirecting of URLs in a not so pretty way (only way I could come up with). And, because of the first useEffect right under handleSubmit(), there are way too ...
haharimoto's user avatar
0 votes
2 answers
131 views

I am using Atomic design to structure my React components. A certain ui child component (an atom) should be shown or not based on a value (prop). Is it a better practice to add the conditional ...
meez's user avatar
  • 4,888
0 votes
1 answer
443 views

I am attempting to conditionally render a and based on whether or not a user is signed in or not using AWS amplify and Vue 3 for the frontend. I have been able to get it to not render and then ...
Chris's user avatar
  • 86
-2 votes
1 answer
63 views

I want to render a div conditionally based on user input in a form. The user enters a value between 0 - 100 and i have to render the 1 out of 3 divs, based on the value (0 -30, 30-60, 60-100). ...
Dumitru Pop's user avatar
0 votes
0 answers
19 views

const proId = useParams(); const ProductId = proId.id; const [proData, setProData] = useState({}) useEffect(() => { axios.get(`https://dummyjson.com/products/${ProductId}`) ...
Akhil Anumula's user avatar
0 votes
1 answer
140 views

I'm having a hard time understanding why I get an hydration error in my server. I tried using the legacy behaviour of the Link component, but nothing works. I also get this error: Warning: Expected ...
adissu's user avatar
  • 1
-1 votes
2 answers
57 views

i have been trying to get my ternery operator to work on a nested fashion on the link component of the router. appearently the ternery operator is flipped where its supposed to be like Condition?true:...
Techlover69's user avatar
-2 votes
1 answer
387 views

I have card mapped with data from an "json" file and want the same details on the card to display on the modal menu In the code snippet is the code for the cards that are displayed and the ...
TiaanSM's user avatar
  • 13
0 votes
1 answer
35 views

I am new to react and working on a project and was wondering how to change the theme of a single Footer component conditionally. Attached are the two themes I am trying to render. Here is the code I ...
Kade's user avatar
  • 5
0 votes
1 answer
222 views

I want to conditionally render the make call button inline based on null value. If the Button makeCall() has a null value. I do not want it to display. If it has a string value then i want the button ...
cosmicslop's user avatar
0 votes
2 answers
493 views

<button type="button" class="btn btn-primary ms-4" (click)="update()">Save</button> <button type="button" class="btn btn-primary ms-4&...
Mohammad Rehan's user avatar
2 votes
1 answer
435 views

So I read a book about react tips and tricks lately and it says // 🔴 Avoid: all the JSX written here will get compiled // even though it is on the false branch const Component1 = ({ isLoggedIn }) =&...
Charitha Goonewardena's user avatar
0 votes
1 answer
664 views

I'm new in react and I'm creating an application that has the purpose of performing calculations to make cryptocurrencies strategies, the thing is that, I already have the programmed API but I need ...
Alec G.'s user avatar
0 votes
1 answer
600 views

Hello I'm doing a dropdown in my website and I'm really new in Vue. I'm using conditional rendering for display some cards. Something like: Cars, Motos, Bikes. When i click on Cars there is a dropdown ...
user avatar
0 votes
2 answers
417 views

I have created a component which basically generates a card which includes card title,card description and a button. Now when I map through an array on a different component to generate those cards I ...
Shakil Ahmed's user avatar
1 vote
1 answer
243 views

I am currently trying to develop a table dashboard for a list of properties for the owner to see. And the issue that I'm having is that when I'm trying to display the tenant information, some of the ...
Prashant Potluri's user avatar
0 votes
0 answers
57 views

I'm refactoring my code as it was bloated with multiple if else statements & states. My issue is the use of states & conditionally rendering. I've only been using boolean states to determine ...
Steven's user avatar
  • 3
0 votes
1 answer
839 views

I'm trying to have something conditionally rendered based on the length of the array I receive from the backend which contain objects. If the length is 0, then I want it to say something like "no ...
Soccerball123's user avatar
2 votes
1 answer
1k views

I have social media posts stored in firebase and each post has a like button. I am using map() function to render those posts but I have declared a single state for like button using useState(). When ...
Gurudatt Puranik's user avatar
0 votes
1 answer
636 views

I have searched around for a while now but can’t seem to find a solution to show a widget (in my case a CircularProgressIndicator) temporarily, in the trailing of a ListTile. I have this “page”: ...
Milan Dol's user avatar
0 votes
1 answer
859 views

I have a navbar which has three links like: Women, Men, Kids. see the image. picture of the used navigation These three category are coming from a api. I have currently hardcoded the links like: ...
Asifur Rahman's user avatar
2 votes
1 answer
662 views

I need to improve the rendering logic so as avoid confusing multiple ternary operators. What could be the best way to do this. I was looking for a way to use the HOC pattern for conditional render ...
the_human_04's user avatar
0 votes
2 answers
403 views

I'm working on an onboarding process that will collect a users name, location, job , etc. It needs to be one question per page but as an SPA so I currently have around 20 components to conditionally ...
maisiemay06's user avatar
0 votes
3 answers
3k views

I want to add if condition inside of use state. So here is my code example: const [buttonName, setButtonName] = useState('Connect Wallet'); const changeButtonName = () => { localStorage....
breking bed's user avatar

1
2
3 4 5
9