I tried to fetch data from an embedded sqlite db and displayed it in list format. The fetchData() function is working, with correct returned result. However, when I used setState() to update the state, react did not re-render. Next I tried to setState() with array [‘a’,’b’,’cR…
Tag: reactjs
How to detect and use the page language in nextJS (ReferenceError: window is not defined)
Im trying to make a site that could identify the country and set the language. To do this in react i use to call thw window.navigator.language. The entire file: the pt / en files its just JSONS with all texts. But window doesnt exist in nextJS That error appears: ReferenceError: window is not defined I need t…
How to clear Multiselect Dropdown in Semantic UI React using a button?
I have a Semantic UI React Multiselect Dropdown inside a React functional component and want to have buttons inside the menu, as such (still need to center them…) How can I clear the selected values using the ‘Clear’ button? I am able to clear the selection using the ‘x’ icon, bu…
Push data into existing array using javascript
I am trying to find a way to build my custom array, but I am not able to do so. What I have done so far: I have my array constructed like so: const super_array = []; Further down into the code, I want to assign new data to the array, like so : Result: Right now, I get the
how to add tab component and load pages in tabs in react js app?
I have a react js app, that i’m working on. I created a myfirstcomponent, which call a rest api and displays some json data. Now I want to expand my app and add more components, say mySecondComponent. but i want to make it such that i create tabs for this. so I researched and based on the tutorials, i c…
get data from dropdown for dynamic call api
So I use redux-hooks for state management, so in my application there is a dropdown, the value will be used to call api dynamically, in the action creator I made it like this but i got this error how to get the value from the dropdown so that it can be entered into the action creator? is it possible? sorry
React.js TypeError: Cannot read property ‘map’ of null
I m not sure how can i explain it. But i will do my best. I’m developing a Movie App. I dont have problem about receiving data and viewing it on the screen. Besides i can see my errors on screen like “Too Many Results” but it’s working only on main page. When i’m doing my searchi…
how may add a new properties in array objets
Hi, How may add a new properties in array objets Well what I want to do is I can add a new property so that I can read the template from the MDBTABLE i have the next example well now, i would like add new properties and result It would be something like this Well add new properties, object array,
Firestore FieldValue.increment()
I’m trying to use firebase.firestore.FieldValue.increment(), but FieldValue.increment() method is not available. I have attached an image contain available methods for firestore. This is my import: Please assist, maybe I am missing something here. Firestore Documentation Image of firebase.firestore.meth…
ReactJs & Styled components, Can’t type anything in the input field
I’m working on personal project using ReactJs & styled Components. I started to move all old css code to use styled-components instead, however I applied it on the Inputs as well, but now it stopped working and I can’t type anything in these inputs. I tried to search and read Styled-components…