Skip to main content
Stack Overflow for Teams is now Stack Internal: See how we’re powering the human intelligence layer of enterprise AI. Read more >
Filter by
Sorted by
Tagged with
0 votes
1 answer
33 views

I have customized the fetch in a Next.js app to get the token whenever a request is made. This is the function: import { getNewAccessToken } from "./getNewAccessToken"; import { cookies } ...
Saikot Roy's user avatar
0 votes
0 answers
28 views

I have this code: <Tooltip title={ <div>{Small description}</div> } > <Stack> <StyleOptionImage/> <...
Federico Giannini's user avatar
1 vote
1 answer
139 views

I can't copy the whole code here. So I have a react component in which I am using 2 blocks of code (dashboard and details). I am conditionally rendering both block. Block 1 contains an AG grid react. ...
SAURABH MAURYA's user avatar
0 votes
1 answer
1k views

I am using a Modal in my React Native app to display address selection options. The modal works fine, but when I use conditional rendering to show dropdown fields based on selected values, the modal ...
Romjan Ali's user avatar
1 vote
1 answer
34 views

I have a vuetify select where I want to restrict the text when too many elements are selected. So I used conditional rendering to just display what I want: <v-col cols="auto"> <v-...
GniLudio's user avatar
0 votes
0 answers
40 views

I'm experiencing layout jumps and abrupt transitions when conditionally rendering headers and tab bars in a deeply nested React Navigation structure. The issue occurs when navigating between screens ...
Nik Tojo's user avatar
0 votes
1 answer
50 views

I'm building a Vue.js application that requires conditional rendering of multiple tables based on certain conditions. I have a set of flags that determine which tables should be rendered, and I'm ...
Khan's user avatar
  • 9
0 votes
1 answer
42 views

Please understand I am just learning.... can someone help modify the code so that when the ‘yes’ option is selected, a hidden part of the form is shown to allow additional completion? I tried to do ...
Mateusz Rozbiewski's user avatar
-1 votes
2 answers
95 views

I am working on a React project where I have two components, UserRules (Component A) and UserEmail (Component B). I need to pass the value of a state variable selectedVoucherOption from Component A to ...
flash's user avatar
  • 1,517
0 votes
1 answer
232 views

In React, have a parent component which conditionally renders the Output component based on whether there is a selected thread: <div className="flex-grow overflow-y-auto p-4"> {...
nzt's user avatar
  • 1
1 vote
1 answer
37 views

I've been working on my first React Project, a CV application where users can input their information and generate a CV. After the user submits the form, the form should disappear and the relevant ...
Aviral Mehrotra's user avatar
0 votes
0 answers
38 views

I want my code to conditionally render some pages after authentication but the current problem I am facing is they are rendering even without authentication. A user can access the pages without ...
Shareef's user avatar
  • 11
-1 votes
1 answer
270 views

I'm using my components as below and I want to check if one of inner components is returning anything or not to make style decisions based on that. <Grid xs={12} md={ Bar() ? 8 : 12 }> <Foo ...
Rocky's user avatar
  • 117
0 votes
1 answer
47 views

i've got stuck in react problems. I've create an online shop (front-end) website in react const products = [ { id: 1, name: "Oppo", price: 200, unit: 1, img: "oppo.jpg" }, { id:...
user25549839's user avatar
0 votes
0 answers
75 views

I am working on a React component where I need to select an item from a list and update the state with the selected item's ID. I then want to conditionally render the selected item. However, I am ...
Deivid Micael's user avatar
0 votes
1 answer
29 views

Inside the build method 👇🏽 Widget build(BuildContext context) { final provider = Provider.of<StateProvider>(context, listen: false); // Get the selected question details from the ...
Dumindu Jayasekara's user avatar
0 votes
1 answer
127 views

I'm using a custom hook to render different elements on the page based on the screen size. Hovewer during rendering there is a delay because of the useEffect hook. Elements that are rendered ...
ledmatrix's user avatar
0 votes
1 answer
41 views

NOTE: this question aims to understand why this code gives this behaviour, not what alternative code would give the desired one. I have a custom component to represent a particular form field, and I ...
Manuel Lera Ramírez's user avatar
0 votes
1 answer
65 views

In my React app, I am trying to create logic for how my input elements should be displayed. I used the window.innerWidth for different screen sizes, as is seen below: <div className='Trends'> ...
Anthony Onah's user avatar
0 votes
3 answers
81 views

I have a React component: const Options = () => { // Option logic if (isOptionOne) { return <OptionOne />; } if (isOptionTwo) { return <OptionTwo />; } if (...
meez's user avatar
  • 4,888
0 votes
2 answers
42 views

This is for an interactive bible. In the following code I have buttons that are being conditionally rendered based upon the buttons I previously clicked. The code calls an API to retrieve the data. ...
Herbie's user avatar
  • 1
-1 votes
1 answer
93 views

I am trying to display a component called 'BillingInfo' on my checkoutpage in react . using tailwind css. <Checkout> //some complex layout //container 1 <div > /** other ...
Ranjeet Thorat's user avatar
1 vote
2 answers
80 views

Creating tabs always works well in React and this is working when opening in a browser, but the 'tabActive' styling is not removed when another tab gets clicked. 'tabActive' styling is getting applied ...
DougFrancis's user avatar
0 votes
1 answer
216 views

Hello HTML/Javascript experts, I need to render large tables (few hundred rows at least) in a browser. In order to help navigating I want to turn on and off sub sets of the rows by check buttons in ...
stacky67's user avatar
2 votes
1 answer
2k views

I am using Astro and TypeScript. How do I add conditionally an HTML attribute rel="noreferrer" to an element in Astro? So when targetBlank = false it doesn't render rel attribute in the dom? ...
meez's user avatar
  • 4,888
0 votes
1 answer
146 views

I have some NextJS image components to the RootLayout of a NextJS component and gave them negative z-indexes and positioned them absolutely as some content is dynamic and I wanted them to be placed in ...
Tamilore Simpson's user avatar
0 votes
1 answer
85 views

I want to conditionally render jsx in my AuthForm component and i'm having trouble specifically with the 'isPasscodeEntry' scenario. My AuthForm component conditionally renders an input form based on ...
codereyes's user avatar
2 votes
2 answers
346 views

I have been trying to display the register component of my react app which comprises of register forms. However, I have not been able to succeed and the youtube videos are confusing me more. ...
Anthony Onah's user avatar
0 votes
1 answer
41 views

I got a total of 3 conditions. When I add the class possible-links-cont-star-btn with the x.feature condition I want to remove the all other classes element have. <Link key={i} onClick={() =>...
Cem's user avatar
  • 13
1 vote
2 answers
1k views

I'm facing an issue with conditional rendering in a custom component in my React application. I've been working on creating a custom component for conditional rendering that renders content only when ...
sansalgo's user avatar
  • 103
0 votes
1 answer
97 views

I have this conditional rendering {livematchcard.event.status_name != "Ολοκληρώθηκε" ? "Τελικό" : (livematchcard.event.sport_id == 4 ? ( ...
agrotis2231's user avatar
0 votes
2 answers
83 views

I am trying to create a condition in order to render an error message in a React App. This is my code {channel.length > 0 || sport.length > 0 && ref.current == true && <Error ...
agrotis2231's user avatar
0 votes
2 answers
1k views

Coming from angular, i would like to know what's wrong with this code. I've been told that i should use useMemo (for the fitlering part) and useRef (to store products). I know how to do that, but i ...
stackoverflower's user avatar
0 votes
1 answer
618 views

so I have a form to let the user upload an image OR a video. Both fields have a default image. I've tried different approaches to render whatever the user uploaded (image or video), but nothing has ...
Sara Bojorge's user avatar
1 vote
0 answers
60 views

So what i am trying to do is that I am doing conditional rendering of my AccountStack and AuthStack on my AccountTab, now my AuthStack contains screens Welcome, Login and Otp and after entering the ...
Faiz Khan's user avatar
0 votes
1 answer
829 views

I want a component to render based on token is available or not - similar to the jwt localstorage authentication. The issue i found that whenever I refresh the page when the token is available still ...
eternalyogi's user avatar
0 votes
1 answer
43 views

I had the below Reactjs snippet in our UI, which works fine now. <Select label="Send To" labelId="send-to-label" ...
user21996911's user avatar
-4 votes
1 answer
672 views

I got an error message when I tried to run the code: "JSX element 'div' has no corresponding closing tag." I was trying to learn conditional loading message. return ( <div className=&...
Sruthi VS's user avatar
0 votes
1 answer
392 views

I am working on a project, where I am using conditional rendering. I am not sure what the cause but I am not getting data from api after refreshing the page. Image of the page on first load Image ...
Shivam Dubey's user avatar
3 votes
3 answers
99 views

I'm new to React. I'm trying to create a Login/Register Screen. I have three components called Login, Register and SlidingCard. I render these componenets on other jsx file called Screen. In ...
Görkem Tandoğan's user avatar
0 votes
0 answers
21 views

I am basically creating an online game .I have set up an Express server which till now served static webpages . Now , I have static webpage which has two buttons 'Create Game' and 'Join Game'. Now, ...
Metronome's user avatar
0 votes
2 answers
656 views

I have an array of nodes, which in my case are objects that have some data, including an id. I only want to display the active node, which is found by comparing the node ID with the active node ID. I ...
Zach Saucier's user avatar
  • 26.2k
1 vote
1 answer
28 views

I'm building a portfolio with VueJs and would display projects with selected tags. Here is my code: <script lang="ts"> import projectsData from "../projects.json" export ...
Saantuu's user avatar
  • 31
1 vote
0 answers
85 views

I'm having a hard time trying to achieve this approach: I have to add a super index number only in some list items depending on their ID. What I is when product with id 198940 and 20084 both exist ...
danipereiracodes's user avatar
0 votes
1 answer
165 views

I am trying to render custom JSX snippets based on the objects stored in an array in using react nestable. But instead of the JSX snippet, [object Object] gets rendered on the screen. Here is my code /...
Siddhartha Sahu's user avatar
0 votes
1 answer
73 views

Currently I have a context to return the verification status of a given user. This context is wrapping all the App. I have one UnAuthStatusProvider: const UnAuthStatusProvider:FC = ({ children }) =>...
João Freitas's user avatar
0 votes
2 answers
52 views

import React, { useState } from 'react' const LoginPage = () => { const [isLogin, setIsLogin] = useState(true); const [isSignUp, setIsSignUp] = useState(true); const [isAdmin, ...
Kittu Kittu's user avatar
1 vote
1 answer
112 views

In the below flatlist the values of event.Tr1C2 may come as undefined in response I would like to display the whole text component only if the value is not undefined and would like to hide the ...
Tony Smith's user avatar
2 votes
0 answers
187 views

I have a React application in which after clicking on the buttons I change the categories and each category has its own layout with text and images. The problem is that I conditionally render this ...
Martin Wsc's user avatar
1 vote
1 answer
61 views

I am trying to render option in code with disable and without disable using key of map and a value of user data but getting error in my console that unexpected token at key>user.col help me to ...
Dheeraj Kumar Yadav's user avatar

1
2 3 4 5
9