Questions tagged [jsx]
For questions about the JSX syntax used by React.js, Vue, and other front-end JavaScript frameworks that allows inline XML literals to be used in JavaScript to describe HTML elements. If your question is about Adobe's extended implementation of JavaScript (ExtendScript) which is at least five years older than React.js, use the [ExtendScript] tag instead.
9,327
questions
0
votes
0
answers
28
views
Change site name [duplicate]
I can’t change the site name, I tried adding a tag
<meta property="og:site_name" content="sitename">
tried schema.org
<head>
<script type="...
-1
votes
0
answers
18
views
What's the difference between component as prop or rendered component as prop (see examples below)
Let's say I have a conponent name Child:
const Child =(props) => <div {...props}/>
and a parent component Parent, getting this component as prop named ComponentProp. What is the difference ...
0
votes
1
answer
37
views
NextJS App Router: How to access child component properties in layout?
To make use of the layout feature in the NextJS's App Router, I want to dynamically update the page title (<h1> tag, not metadata like <title>) on the layout depends on what the page ...
1
vote
1
answer
33
views
Is there a way to redirect to different links depending on the user's status?
import React from "react";
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from "@/components/ui/card";
import Link from "next/link";
import { ...
3
votes
1
answer
79
views
Fixing Transparent Line Between Div with Clip-Path and Parent Div
A thin, transparent line appears between the triangular div and its parent div when zoomed. I believe this is likely caused by anti-aliasing in the browser. If there is a way to fix this, I would ...
0
votes
0
answers
20
views
How to Wrap FlatList rendered Items in a Fixed-Height Container in React Native?
I have a problem where I want to render a list of items using FlatList, but I expect a large number of items and want to wrap these items in a container with a fixed height. This is to save screen ...
0
votes
0
answers
11
views
Echoing from .jsx into Blade file. ReactJS & Vite
I've got a weird problem where I'm transferring blade.php code into .jsx, and in Blade, PHP's echo {{asset()}} and Blade's @ syntaxed code is referred to a lot.
How would I go about putting it inside ....
0
votes
0
answers
21
views
How do I stop react-slick slider image from indefinitely expanding and fit the container?
I am trying to create an image slider / carousel inside of a box. I have got the carousel working, but the image is too small. Whenever the width is adjusted (or infinite is true) the image just ...
0
votes
0
answers
15
views
integrating a MUI minidrawer in my react project
I want to try the MUI Mini variant drawer in my react project but it doesn't work :
I created a react vite project , I installed the @mui/material and @mui/icons-material packages, and from the MUI ...
0
votes
1
answer
28
views
React app 'Encountered two children with the same key, `thumb-undefined`'
I'm trying to create a time slider in my react app and I can't beat this error below that keeps showing up in my browser console.
bundle.js:21658 Warning: Encountered two children with the same key, `...
0
votes
1
answer
54
views
Showing intersection of a plane in a 3d shape with Three.js
I tried to animate with Three.js to show the intersection plane on a 3d object. In this example, I have used a cone as an example for the 3d object in the following code:
import React, { useRef, ...
0
votes
4
answers
55
views
How to make text follow progress bar
How can I make my currentProgresstext follow the progress bar, for now it seems that setting progressWidth to 100 makes the text appear on the left (following the progress bar). And the progress bar's ...
0
votes
1
answer
35
views
Using an external function to fetch data in NextJS
I'm trying to limit repeated code by moving the code that fetches data to an external file.
The fetchUserInfo I'm using uses the useEffect, useState hooks and as such needs to be a "use client&...
0
votes
0
answers
24
views
Alter Javascript hash inline
My script is like this, TableCell has the one element sx which works like a stylesheet
Material-UI
https://mui.com/material-ui/api/table-cell/
var sx = {padding:"10px 0px 10px 0px",fontSize:&...
1
vote
1
answer
38
views
HTML Table is not overflowing its container
I am trying to make an html table overflow its container to have a scrollbar on mobile, but it is not working.
Here's the code:
export default function Stats({ pokemon }: { pokemon: PokemonWithColor })...