Welcome to Code Forum!

Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

react

  1. P

    React custom hook function constantly returns null

    I have a multi-use React Hook function, useGetData({url}), that takes a url, does a Fetch API, then returns the resulting JSON array string for further processing in other functions and components. However, useGetData({url}) constantly returns null every time, no matter what I do. import {...
  2. P

    How can a React project work with multiple HTML files?

    Currently I have a React project that, by default, goes to /public/index.html, serves up /src/index.js, and the homepage is displayed just fine. However, I will also need to do the same to /public/guide/index.html, to /public/login/index.html, /public/questions/index.html, etc. I have static...
  3. P

    How to return HTML into component without using <div> tag

    I have a page that uses CSS, namely Bootstrap, for design and styling, and extra <DIV> tags can affect the page's look-and-feel, so I want to return HTML from a React function inside a component without having to use a <div> tag: import React from 'react'; import DOMPurify from 'dompurify'...
  4. P

    Cannot read properties of 'undefined': 'props'

    I am trying to write a very simple React standalone function that will take a URL as a parameter and return the fetched HTML as a result to the parent component. Here is my code: import { useEffect, useState } from 'react'; const GetData = ({ props }) => { const [html, setHtml] =...
  5. Grynn

    JavaScript My React Portfolio

    Hi I'm brand new to you this site and relatively new to web dev world. I graduated from my boot camp (shout out to General Academy) in April. And I've been feeling progressing less imposter syndromeyyy as i am beginning to feel this wonderful wonderfullness about myself progressively and...
  6. accol

    JavaScript Components aren't being rendered properly using OutPortal and no children in InPortal react-reverse-portal

    Thanks for reading. I can't figure out how to reparent card components to deck components when they overlap each other so the cards don't need to be destroyed and be recreated. Currently I'm just trying to figure out how to show them on the page properly using react-reverse-portal (used for...
  7. accol

    JavaScript Model validation error when using Fetch or Axios despite returning a status 200 in the backend?

    Thank you to anyone who reads and replies to this. I do not know what I'm doing wrong by this point. I've been trying to connect the React.js frontend to my ASP.NET Core backend. I've tried both Fetch and Axios and I've been getting the same error each time, however it doesn't make sense to me...
  8. accol

    JavaScript How to animate input placeholder text shaking in React using Framer Motion

    Thank you for reading. I'm trying to figure out how to make each letter of the placeholder username and password text either shake or animate in a wavy motion, however if you type in words the placeholder would disappear and stop animating as typical. I was using Framer Motion & React: Wavy...
  9. Johna

    Node.JS 'TypeError: superagent.agent is not a constructor' when sending POST request to functions on CloudFlare Pages

    Hi everyone. On a site I'm creating, there's a newsletter form. I'm using Brevo (previously SendinBlue) to add the email entered in the newsletter form to a contact list. The site is hosted on CloudFlare Pages, so I'm using the functions API to send a POST request to...
  10. weisr

    JavaScript Google OAuth problem

    Greetings, I am having a problem with the new google OAuth, as when I click on the "sign in" button I get a blank site instead of my account choices. Could anyone have a look at the code and help me find the problem? https://github.com/Bobenheim/Share_Me Thank you in advance for any help.
  11. sallu110

    Sincere Career Advice Needed

    Hello everyone! So today I will be asking some very important questions which many others might relate to. Your advice might influence my decision so its a request to answer this if you have reasonable amount of experience in the IT industry. My short intro: I am 26 year old. Completed my...
  12. M

    HTML & CSS How do I make a component like this?

    I use React JS and scss I need to make a component like this This is a component of the message We need to make one like on the photo, the component can come with a different number of images and with different sizes
  13. Artur

    React - Upload avatar to firebase

    Good afternoon, I can’t figure out how to upload a photo (avatar) to firebase, but so that the avatar for each user is different and saved at each user login. User registration via firebase Authentication const [user, loading] = useAuthState(auth); const [image , setImage] = useState("")...
  14. DavidFrear

    JavaScript Webpage displays Blank when 'npm start' ran in terminal

    I have started building a react webpage and when I run npm start in the terminal the localhost:3000 page loads with no errors etc but its just blank. I tried adding some text in white to see if but I cant! I am new and just need pointing in the right direction if someone can.
Back
Top Bottom