Cannot read property "Component" and Slice errors
See original GitHub issueProbably not an issue with the table. Not really sure. Im still in development but i just started having a lot of problems. I always get this error, usually on initial page load or refreshes. Based on some research I’ve tried downloading the latest CSS and using different CDN’s ( I prefer CDN’s) but nothing seems to change the behavior.
And now more often than not, i get this as well when i refresh the page. I only included it just in case. Ignore it if its ‘unrelated’. I think I have a undefined state value issue to deal with. But this shouldn’t be messing with my tables, right?
im currently using these CDN’s
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-bootstrap-table/2.11.2/react-bootstrap-table.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/react-bootstrap-table/2.11.2/react-bootstrap-table.min.css">
The code for my page in question is here.
https://github.com/dnbr2002/FE/blob/master/src/js/pages/EventerPage.js
If possible let me know if you see anything that would help me get these selectable tables more stable cause I was really liking them. Thanks!
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
@AllenFang I was setting the initial state of the data in the parent wrong. Using {} instead of []. Specifying to set an ‘empty array’ helped me resolve the issue. So now I have no more undefined slice issues in the tables! Thanks!
@AllenFang
So regarding the first error, you were right it wasn’t the react-bootstrap-table js or css files. Oddly I needed to add these references to my index.html for React and React-Dom. This solved the first error.
I don’t know how i got this far in my project without these CDN’s but this resolved the first error.
Regarding the second error it is the Data im fetching for the tables that seems to be the issue. Originally I had no issues fetching the test data in the component but this does not seem to be working anymore. I guess I should be loading the data and confirming it before I ask for the table as you suggested. Im still working out the the order of operation in Reacts data flow it seems. Thanks