Category : reactjs

I’m working on a next JS, React, Apollo, graphQL, faunaDB App. I am trying to architect how a form builder would work with it’s mutations to fauna via graphQL. I am able to run mutations from the playground, and can query from the front end and build my form. Interaction seen here https://www.loom.com/share/7f7d1e1231d445f2be6b5db2c81239b6 Now I ..

Read more

The following code works, but does not re-drive the app render() upon a successful redux dispatch call. I cannot see what is wrong. There is mocked up data here I put in to simplify things trying to debug this rudimentary problem. What works: The app react component renders the first time The dispatcher successfully invokes ..

Read more

So I know this is going to be an unusual question to ask. So, I have a Project Component which is conditionally rendered in App, where I have a state and a function for toggle functionality, and outside click logic. So my intentions are when I press on the div, content is going to pop ..

Read more

I’m trying to implement FCM for my App, and I couldn’t yet receive the device token due to this error. Here is the code I’m trying to run: export const requestFirebaseNotificationPermission = () => new Promise((resolve, reject) => { messaging .requestPermission() .then(() => messaging.getToken()) .then((firebaseToken) => { resolve(firebaseToken); }) .catch((err) => { reject(err); }); }); ..

Read more

i have simple HtmL form with some dropdown and i want to get all form values as Json and post it to some url. the following is the submit function. function send(e,form) { //Obj of data to send in future like a dummyDb var data = new FormData(document.getElementById(‘form’)); console.log(data); const apiUrl = ‘https://httpbin.org/post’; //POST request ..

Read more

I am calling an event listener inside a function in React hooks – not using useEffect and removing it inside the same function which is called when event fires, is there anything wrong with that? Example : – const handleMyEvent = () => { … … const element = document.querySelector(‘myDiv’); if(element){ element.addEventListener(‘mousemove’, handleMouseEvent); } } ..

Read more