Skip to main content

All Questions

Tagged with
1 vote
0 answers
71 views

Chunked polyfill for browsers without Intl support throws an error

So I'm encountering this problem when trying to run my frontend after I set this piece of code for polyfilling the Intl object and its related internationalization features in browsers that do not ...
Maks's user avatar
  • 11
0 votes
1 answer
728 views

In despair, how to route a React app with Next.js

I am new to Next.js. I have my index.js in the Pages folder and 3 other files in a component folder under Pages. In that folder, I have a Signup.js, Signin.js and a Lostpassword.js. What I am trying ...
AegisofSins's user avatar
0 votes
1 answer
251 views

How to link a user to the settings page to change permission to know location?

A user has denied my app permission to know their location via GPS. They did this by accident. How the app needs to link them to the settings page where they can change the permission. How to make ...
Bear Bile Farming is Torture's user avatar
0 votes
2 answers
1k views

How to see html result built with reactjs

I'm building reactjs app. I want to grab full html output but when I try to view page source I see only template from index.html. How can I see HTML built by the app? I believe it is possible because ...
Yola's user avatar
  • 19.1k
1 vote
1 answer
433 views

Where to save user info in frontend?

I am using react with redux for frontend. There is login functionality in the application and users can have different role. So when the user logs in, it will get userId and the role. I save the role ...
d y's user avatar
  • 21
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....
Mehmet Eyüpoğlu's user avatar
0 votes
1 answer
57 views

Show spinner for loading image to get width/height?

In a react application I need to go from page A to page B in an SPA, and to go from A to B the clicks a button to upload an image. This is the trigger to go to from A to B. But before either going to ...
Adam Thompson's user avatar
-1 votes
1 answer
91 views

How to add an if condition inside id of a JSX div?

I would like to change id of a div in jsx like so :- { ['A','B','C','D'].map((element, cell) => ( <div id="alphabet_if({element}==='A'){'ok'}else{ {element} }"> Some </div&...
vjjj's user avatar
  • 1,069
0 votes
3 answers
1k views

How can a string be added to React JSX div id?

I would like to change id of a div in jsx like so :- { ['A','B','C','D'].map((element, cell) => ( <div id="alphabet_{element}"> Some </div> )) } But this results in &...
vjjj's user avatar
  • 1,069
0 votes
1 answer
36 views

In React, On clicking browser back button I should click one DOM ele(for instance, button) and should be in the same component

window.addEventListener('beforeunload', () => { document.getElementById('sample-button').click() }) which event listener should be added?
HareesH's user avatar