Hello i am new to react native and im trying to create a realtime chat application using pusher-js so i installed the package npm install pusher-js @react-native-community/netinfo and put the following code in my useEffect and im getting this in the console Link of the image Im using react-native run-android …
Tag: javascript
It’s possible to inscribed a child with equal width and height, not exceeding it’s parent, using only CSS?
My idea is to get the child object (@example the “.moon”) to have the equal values of height and width, and not exceed the width or the height of the parent (@example the “.sun”). So when the parent width is bigger than its height, the child’s value for width and height is the sm…
scrollIntoView not executed in touch event listener
I’m trying to make a vertical slide, it works on desktop with wheel event but the scrollIntoView methode doesn’t get executed in a touch event listener. Here is the code The weird point is that the console logs inside the conditions are executed and the scrollIntoView method works outside the even…
How to make a fully functional brainf*ck interpreter?
I have tried to implement a BF interpreter in Javascript. It works for many programs like printing Hello world, looping, etc. Here is link to a sample interpreter that I use for comparing outputs: https://sange.fi/esoteric/brainfuck/impl/interp/i.html But when I try to run a BF to C program, it gets stuck lik…
REACTJS how to load a page at the end of timeout?
Im new to REACTJS and trying to make a webpage for practice. I can’t figure out how to load a new page at the end of timeout. Basically what I am trying to do is to make the Main page load and then start a timer for about 5 seconds and at the end of the 5 seconds I would
Find empty arrays in nested array and remove them in Javascript
I have a nested and hierarchical array of objects, which looks like this Now I want to remove the empty array “children”: [] from the last children. I’ve tried it with reduce but it doesn’t work without any error. Answer You could use recursion for that.
” Failed to execute ‘removeChild’ on ‘Node’: parameter 1 is not of type ‘Node’ ” javascript
I have this error showing on my console although everything is working fine, I have divs of books name, and beside them a button “delete. at the bottom I have a form with the button “add”, I am trying to add and delete books according to event “click” and it works fine, but IR…
Gettting an undefined value from bcrypt hash function
Ok, I’m getting an undefined value from a function, I don’t know why, I’m trying to get the value of a password hash for insert in the database, but the const that have the function has the value “undefined”, so what I should change in my code? Answer When you call bcrypt.hash() …
React Native – Pressable – Can’t run sample code
i am trying to run the example code from react native you can find here: https://reactnative.dev/docs/pressable I allways get the error message: Warning: React.createElement: type is invalid — expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s%s, un…
Too long title slide the menu button to the right outside of the card
I have a problem with MuiCardHeader For some reason too long title or subtitle slide the menu button to the right outside the card. How can I prevent it? Result I need Here is code sandbox https://codesandbox.io/s/dazzling-paper-5d35h?file=/src/App.js UPD: Solution Add the following code to .MuiCardHeader-con…