All Questions
8 questions
5
votes
1
answer
752
views
Why is useEffect render-blocking(paint-blocking) in the tooltip example?
I am following the tooltip example for the useLayoutEffect hook from the new react docs. From their explanation, I assume that the following is the order of execution of things:
react render() --> ...
0
votes
1
answer
56
views
My simple if-statement works on Google and FireFox but not on safari? I am building a quiz app in React.js and the logic is pretty simple
So the code is pretty straight forward, I am comparing the the user's answer with the correct answer. I am using useState() to manage the correct answer and I am extracting the user's answer with ...
1
vote
0
answers
148
views
How to manipulate the DOM of React.JS app in chrome browser and need to add a event listener for a specific button present in source code
Is it possible to manipulate the DOM of react app especially the JavaScript functionality? I tried chrome extension React Dev Tools and able to change HTML content only and if the application is in ...
1
vote
0
answers
783
views
What are render and commit phase exactly in React JS? And how virtual DOM helps actually?
I have read many blogs on render and commit phase in react. But couldn't understand much exactly. They mention render phase is a slow process and commit phase doesn't takes time.
In simpler words, is ...
4
votes
2
answers
1k
views
React/Browser - Does any data get stored on a user's device with a useState hook, post a page refresh?
Given a use-case where there is a need for users to input data into a React application for the purposes of on-the-fly calculations. However, from a security perspective, the user-inputted data should ...
0
votes
1
answer
36
views
How to validate click one per browser?
How can i reduce raiting to be able to rate only once per browser?
I need to make validation for raiting component in React where client can rate only once per browser.
Here is example of the rating ...
3
votes
2
answers
8k
views
React app does not fire off onScroll events as expected
I am trying to show a specific component - a "sticky header" piece when the page displaying it, is scrolled X number of points off the top.
I tried doing this with the useWindowScroll hook ...
0
votes
0
answers
79
views
useSelector behaves differently on Firefox and Chrome
This code works on chrome and fails in firefox:
const loginCredentials = useSelector(state => state.login.state.loginCredentials) || {};
I am getting the following error on firefox:
state.login....