Issue I need to convert the given class component into a functional one. I’m working with outputting an array of multiple Editors draft-js and I’m having some trouble outputting them. On the internet, I found a working class component with
Continue readingCategory: reactjs
[SOLVED] Vite with react-router-dom
Issue I am developing a webapp with two pages using Vite and react-router dom, everything was working fine while in development mode. But when I build de app, the only page that works is the index (path="/") I am using
Continue reading[SOLVED] Why can't I access Audio ref in React/Next.js?
Issue I’m using React/Next.js to create an Audio player, but I can’t figure out how to get the duration of an audio file. As I understand it, I need to use the useRef hook to get access to the HTML
Continue reading[SOLVED] Custom hook state update not re-rendering the component
Issue I wrote a custom hook to set and retrieve the cookie in the browser. import { useEffect, useState } from ‘react’; import Cookies from ‘universal-cookie’; const useCookie = (key, _options = {}) => { const cookies = new Cookies();
Continue reading[SOLVED] React + Firebase App vulnerable to Lucky13 Exploit
Issue I recently went through a pentest from a 3rd party company on my React.js web app, hosting on Firebase Hosting (+ Authentication, Functions, and Storage) and one of the vulnerabilities pointed out by the pentest was Server Vulnerable to
Continue reading[SOLVED] React symbol evaluation. Caret and tilde symbol
Issue while reading React code, I encountered following statements using tilde and caret symbol, but couldn’t figure out how it evaluates:- const serviceUrl = `~^service, /enterprise/core-customer/example-path/${guid}/adresses/?purposes=PRIMARY, ^~` Solution Those symbols are not part of JavaScript or React syntax. Your project
Continue reading[SOLVED] Why Bootstrap nested columns are not beside each other but below?
Issue Why here left and right are not beside but below? <section className="section-top-overflow"> <div className="container"> <div className="row"> <div className={"col-lg-12"}> <div className="col">left</div> <div className="col">right</div> </div> </div> </div> </section> Found here this info: Remove the col-12 as Bootstrap 4 requires a new
Continue reading[SOLVED] MUI ToggleButtonGroup don't render first tab component
Issue I have ToggleButtonGroup inside ToggleButtonGroup from MUI. In first picture You can see Tab "USTAWIENIA" which has inside "PARAMETRY GRANICZNE" and "CYKL PRZEGLĄDOWY" tabs. First one is underlined so it has class Mui-selected but it does not render component
Continue reading[SOLVED] React Unexpected token < – babel loader
Issue Hi i have problem with babel-loader it write me ERROR in ./src/js/pages/Admin/views/Pages/Register/Register.js Module build failed (from ./node_modules/babel-loader/lib/index.js): SyntaxError: C:\Projekty\eshop_frontend_template\src\js\pages\Admin\views\Pages\Register\Register.js: Unexpected token (7:6) > 5 | render() { 6 | return ( > 7 | <div className=”app flex-row align-items-center”> |
Continue reading[SOLVED] How to resolve an error at reactDOM.render
Issue index.js import React from "react"; import ReactDOM from "react-dom"; import App from "/src/App.jsx"; import { BrowserRouter } from "react-router-dom"; ReactDOM.render( <> <BrowserRouter> <App /> </BrowserRouter> </>, document.getElementById("root") ); App.jsx import React from "react"; import { Switch, Route } from
Continue reading