score:0
thanks to @christiaan i managed to render the data properly on the component by refactoring the listdir function as follows
// function to list files inside a path
// (path: "file:///storage/emulated/0/bap/" will list all the .bap files inside "internal storage/bap" folder)
function listdir(path: string): promise<bapfileentry[]> {
var bapfiles: bapfileentry[] = [];
return new promise((resolve, reject) => {
window.resolvelocalfilesystemurl(path, entry => {
var reader = entry.createreader();
reader.readentries(
(entries: bapfileentry[]) => {
entries.foreach(item => {
if (item.isfile) {
bapfiles.push(item);
}
});
resolve(bapfiles);
},
(err: any) => {
reject(err);
}
);
});
});
}
Source: stackoverflow.com
Related Query
- React component not displaying the correct data from Redux. Console log shows the correct data
- react redux not displaying the correct data
- How to console log the data from another react component when clicking a button?
- React Router "Link to" does not load new data when called from inside the same component
- React router dom passing data from parent component to child router component does not pass the props.match
- react component not render new data from redux store
- Why the data from my object is not setting to my setState in my react class component
- Selector data is loaded correctly from the redux store, but not displayed by the calling page component
- React Component not Rendering New Data from Redux Store
- React - Redux component not displaying array.length correctly despite component being rerendered on state change without mutating the state
- Is this the correct way to show data in React from a fetch request, if not how do I change JSX being rendered to a component?
- React Bootstrap Table is not displaying the data fetched from api response
- loop through multiple objects inside the first array from JSON data displaying two arrays with objects in React using FUNCTION COMPONENT
- The result shows in console log but not on the page when using useRef & useCallback in react
- Need to send the checkbox Filtered Data from Child Component to Parent Component : React Hooks, Redux
- Why the react component is not returning the current data from redux?
- React Component event handler function did not received the newest value from Redux Store
- React modal custom component not showing the correct data
- array.map from redux won't return data on the first load of react component
- Data from API is displaying in the console but not in the DOM, why?
- React component do not gets rendered when loading the data from state
- useContext is not displaying the updated state (when data is retrieved from firebase in useEffect hook in global file) in child component
- Is there a right way to pass data into a React component from the HTML page?
- Laravel 5.5 render a React component in a blade view with data from the controller
- Importing data from excel and displaying in a react component
- How can I cache data that I already requested and access it from the store using React and Redux Toolkit
- How can I use react useContext , to show data from context, in the same component
- Why is this variable from the Redux store not in the `this.props` on React page?
- Is it a bad practice to use state in a React component if the data will not change? Should I use a property on the class instead?
- I can not get the state from react router Link component using useLocation. So how can I pass it?
More Query from same tag
- dangerouslySetInnerHTML in <td> not working when placing content inside <td>
- TypeError: Cannot read property 'map' of undefined - how to access an array in a local json API
- jquery__WEBPACK_IMPORTED_MODULE_0___default.a.hubConnection is not a function
- Need to fetch data into array BEFORE sending it as a prop in React
- Can't get Nested JSON Object Property Typescript
- How to remove an element from a key value array?
- Navbar with Tailwind Hover Has Stopped Working
- Redirection to dashboard after login in react
- managing grouped buttons loading state within a map function
- Code Mirror 6 & React component on update re-subscribe after CM6 state reset
- Unhandled Runtime Error nextjs - TypeError: Cannot read properties of null (reading 'tagName')
- Axios call gives infinite loop
- how to calculate width of component in react js?
- React TS onClick select input value
- How to import "content-based-recommender" package in Reactjs
- How to spy on a class property arrow function using Jest
- How can I map a nested object effectively?
- To many calls of useEffect - React
- How to include third party js libraries in React app
- this.props is undefined inside Method
- React: How to get value out of function and write it in state?
- How to input text into form during React/Jest/Enzyme Shallow Rendering testing?
- Should React component's not required prop be inside defaultProps
- Error: Cannot read property of null
- Display Multiple Images from Json in ReactJS
- Typescript: Inferring types dynamically
- React: TypeError: Cannot read property 'prototype' of undefined
- Not able to access array elements in react JS
- react lib elliptic json appear on prod bundle
- Why is not this onClick work?