All Questions
563 questions
1
vote
1
answer
36
views
Updater function not working in variable context api - react native
Please help, I am creating a survey system. Each survey will have an undetermined number of questions, so their painting is done dynamically, that is, if it is type select, text, numeric, etc... for ...
0
votes
0
answers
55
views
Unable to preventDefault inside passive event listener invocation.... i dont understand
When you click on input range, it says dual-range input Unable to preventDefault inside passive event listener
enter image description here
[email protected]:6878handleTouchStart@...
2
votes
2
answers
139
views
How to indicate type of a variable and an array we know for sure that the value of the variable is in the array in Typescript?
Do you guys know somehow to indicate type of a variable we know for sure that the value of this variable is in an array in Typescript?
For exemple, I want to display a list of tabs on a tabs bar:
...
0
votes
1
answer
41
views
React Native how to array filter by 2 conditions?
I have function as below to filter my array from list:-
.map(d => ({ ...d, data: d.data.filter(c => c.name.toUpperCase().includes(searchText.toUpperCase()))}))
.filter(d => d.data....
1
vote
2
answers
83
views
How do I map an array and change the color of the text of just the item I tap on using React Native?
How do I change the color of a single item from a mapped array? My code below will change the color of all the items in the array to green. I want just the item I tap on to turn green. Any help would ...
0
votes
2
answers
85
views
React useState Hook is not updating array
I am trying to use React Native to create a To-do list application. And use the UseState hook to add more task to an array to map on the front-end. But I cannot use useState to add new item in the ...
0
votes
1
answer
41
views
How to retrieve Corresponding values in array of object on button click in react native?
i am using below code to display each company name with the help of map and Object.entries. So i have used each company name as a button as in below code.
But now my challenge is how can i display id ...
0
votes
1
answer
57
views
React Native useState not behaving correctly
Can anyone seem to figure this out as I'm really struggling, I have been trying to use useState, this is the arrays i have so far
const Body = (props) => {
const [workoutText, setText] = useState(...
0
votes
2
answers
52
views
Join texts based on condition in an array of dictionaries in JS/React
I have data like this:
Record= [
{ "tid": 1, "token_text": "Canis", "spanid": 1, "label": "Name" },
{ "tid": 2, "...
1
vote
1
answer
32
views
Cloning state array always empty, cant add new item to state array react native
I am trying to build shopping cart like feature.
The problem is I cant add new order / update new item to react state array by cloning it.
It works if I mutate it.
const [data, setData] = useState({
...
0
votes
1
answer
86
views
My state array doesn't add object (React Native)
I'm trying to update a state where there is an object array, but it somehow doesn't change state at all! I'm following this docs https://react.dev/learn/updating-arrays-in-state and checked many ...
0
votes
1
answer
49
views
React Js child map function returns only first parent map function value but not others on using input type radio
I am using 2 arrays and rendering it as parent and child map function
Array :
const array1 = [{id: 1,message: "apple",},{id: 2,message: "banana",},{id: 3,message: "cherry"...
0
votes
1
answer
70
views
In react-native how do I update a nested value in an array?
A user selects the needed type for the data entry form using a react-native SelectDropdown
{/* Select Dropdown creates a TextInput */}
<SelectDropdown data={types} onSelect={handleSelect} ...
0
votes
0
answers
41
views
State not updating in redux - React-native
I am fetching the data using axios in redux from which I am updating the state, but, It shows empty array in my movies component when I console log, but, when I console.log in the redux where I am ...
0
votes
1
answer
49
views
How can I create a new array from an original array making use of ONE MORE DIFFERENT ARRAY in Javascript?
Here are two simple arrays, one is an original list, the other is a selected index from the original one.
I just want to re-create a new array, based on the selected index array.
Here is my code.
...