Trying to get the width/height of the element in react
I was trying to get the width/height of the div in react but when I print the value it says undefined at first in console but if I make some changes in the code (not changing the whole code but instead doing something like removing a semi colon or adding semi colon) and then press ctrl + s in vs code then the value gets printed in console, i tried adding a set time function to delay the function call but still first i get undefined
Refresh page its not working and renders my component with user: null
import { createContext, useEffect, useState } from ‘react’; import * as coreApi from ‘@services/ohtCore/Endpoint.ts’; import { Permissions, User } from ‘@services/ohtCore/types.ts’; import { clearAuthTokens, getAuthTokens, setAuthTokensInCookies, } from ‘@services/auth/tokenStorage.ts’; import logger from ‘@utils/logger.ts’; import LoadingSpinner from ‘@components/LoadingSpinner’; interface AuthContextProps { user: User | null; accessToken: string | null; login: (username: string, password: string) => any; […]
Cookies not accessible in backend server
req.cookies.jwt is defined in localhost but undefined in deployment. The cookies are being set in the browser, the only problem is I can’t access them.
Cookies not accessible in backend server
req.cookies.jwt is defined in localhost but undefined in deployment. The cookies are being set in the browser, the only problem is I can’t access them.
Does not want to go to the book page (using API)
The problem is this: I’m learning how to make a site on React+Django. And everything was fine until there was a need for a file that would take the book values on the page via API.
Checkbox map checked from 2 arrays
I have an array that creates checkboxes, which works, but I also have another array which is constructed from a user array including the rights a user has. Now based on that second array, I want to have a checkbox shown checked if the user has that specific right.
How to handle a section which itself has scrollable content in ReactPageScroller?
I’m using ReactPageScroller. I’ve 4 sections. The third section has some content which must be scrollable. Now, when I’m going to that section, the whole page scrolling is overriding the section scroll. How can I handle it.
React invalid hook call and cannot read properties of null reading useRef
I have a code from a login/register page which i found from a tutorial, on the tutorial it works fine but i cant make it work
I deleted all the elements behind it, and printing is not the result I wanted in react
When I clicked on the element I wanted to delete, the result I wanted was not printed. The key for my current element was not printed, only the keys for the previous elements were printed
And I deleted all the elements that I clicked on and after, oh my god
Sort Object.keys map
I have the following: