Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
354 views

In my svelte app, I have a conditional statement that goes something like this. "If the video source exists, render the Video component, else always render a default image". I am finding ...
lache's user avatar
  • 850
0 votes
1 answer
1k views

I'm trying to conditionally render a component inside another component that uses react-draggable. If my return function returns a div, dragging works fine. If my function returns SomeComponent, ...
jbcortez89's user avatar
0 votes
2 answers
661 views

Using react hooks inside any function of condition is invalid. Neither can I do conditional rendering for a hook. Is there any way to use a hook with emplement condition? Please share code
Sanaullah's user avatar
0 votes
1 answer
58 views

I've got a list of products to render. I also have an array of keywords that are used to exclude products from being rendered. I am looping over the array of keywords and checking if the product title ...
ComicDansMS's user avatar
0 votes
1 answer
111 views

As you can see I want to hide menu bar and footer when notfound page is rendering .I tried all the other solutions but didn't happen to work in my Scenario. I wanted the Navbar and footer hide in 3 ...
Istiak Hasan's user avatar
1 vote
1 answer
382 views

I want MyList to render whatever is in localStorage (works great), however when there is nothing in local storage and I render the component, it renders empty. I would like to have a placeholder there ...
JLB's user avatar
  • 29
-1 votes
1 answer
2k views

I've passed a prop - {pov} to a component- Page I also have two other functional components - VisitorPOV and OwnerPOV if pov === 'visitor' , I want to render VisitorPOV Component else OwnerPOV ...
mysteriouscoder's user avatar
1 vote
1 answer
2k views

I have a GROQ query where the result is an array of documents, of which one of the fields, "fieldName", can contain "a", "b" or "c". If the array contains any ...
Anthony's user avatar
  • 387
0 votes
1 answer
544 views

I have pretty simple table of users here with only 4 cols, and i want to show a button for each user depending on his status 'isActive'. If user is active i want to show button with text 'disable' and ...
Edin Osmic's user avatar
0 votes
1 answer
418 views

I'm trying to render a component conditionally based on a particular state. The code below is inside of a mapping on another file. I have a setState const of open and whenever a user clicks the '...
Claude M's user avatar
3 votes
1 answer
9k views

What works: I want to render an element only if some boolean value is true using Vue 3. This is an example following the Vue 3 documentation and it works just fine: Template: ... <div id="...
Quaenor's user avatar
  • 31
2 votes
3 answers
199 views

I'm trying to determine how secure it is to hide information with conditional rendering in React. In the following React code, I hide the information "nnn" if the user is not logged in. ...
Edward Tanguay's user avatar
1 vote
2 answers
2k views

I am trying to hide an admin menu using v-show. In the code below the isAdmin value is false, yet the menu still shows. I have also tried v-if but that doesn't work either. <v-list v-show="...
mikeym's user avatar
  • 6,581
0 votes
1 answer
108 views

The React application I'm building has a TaskPanel component that uses a list of task names from its state to render a list of divs with Task components. The TaskPanel component uses this function in ...
mdkazierad's user avatar
1 vote
1 answer
840 views

I'm trying to filter items in a sidebar according to roles, I tried to do a conditional render in the login submit but I think it didn't work for me, I logged in and showed the items according to role ...
Marjorie's user avatar
0 votes
2 answers
445 views

I am looping through an array of objects, then based on a condition I am display that row in one Table or the other. However, when i call that condition, the object reacts how I would like (it ...
Brian 's user avatar
  • 169
0 votes
1 answer
142 views

I am trying to do a prediction on a model using a rest API and show the output on frontend using react. If the prediction is 1 then I need to display the second prediction using conditional rendering. ...
harsh's user avatar
  • 595
0 votes
1 answer
3k views

I'm building a React app using hooks and functional components for the front end to a Rails backend API with Cookie / Session authentication. Everything is working well as far as getting users logged ...
firesoflife's user avatar
0 votes
1 answer
40 views

I have a small question but I can't figure out how to perform it and how to find an other related post. Basically I want to display the instagram part only if there is {d.socials2}, otherwise I want ...
J.erome's user avatar
  • 828
0 votes
1 answer
70 views

I have a lot of components being rendered based on different states that I'm using for a game. I'm currently using the method where I check the value of state with ampersands. I'm not sure if there's ...
laneherby's user avatar
  • 485
0 votes
1 answer
2k views

import { display } from '@mui/system'; import React from 'react'; import "../user_config/user_page.css" export default function FileUploadButton({showBtn, setShowBtn,value,...rest}) { ...
Sougata Mukherjee's user avatar
1 vote
1 answer
711 views

How can I make all of the css inside the following hover psuedoclass conditionally render when a variable (data) is not null? I have the following styles in my React Component (which uses Material UI ...
Katie7's user avatar
  • 889
0 votes
1 answer
330 views

I've been trying to do some conditional rendering based on the user that is logged in. Is there a way in React JSX to check if more than one condition is true? I know this syntax is wrong but is there ...
benleem's user avatar
  • 25
1 vote
2 answers
1k views

I am new to React and creating a Tic-Tac-Toe game. I want to create a starting page with three options : Start Rules Exit On clicking the start button I want to render the component which consists ...
Ayushman Sinha's user avatar
0 votes
1 answer
190 views

UPDATE I found a different solution- the page "responsiveness" wasn't working. after adding: <meta name="viewport" content="width=device-width, initial-scale=1.0"> ...
Yonatan's user avatar
  • 21

1 2
3
4 5
9