Typescript vs 2017 paginator runtime error reopen
Hi Allen,
Follow on to your previous email, I still have this same issue. Bootstrap table2 works correctly but including paginator will cause the loading error.
I have install react/react-dom ^16.0.0 globally to ensure that VS 2017 can see the latest as you have suggested the clue is in having the later version of react.
Please see attachment of my screen capture of the VS IDE where it clearly shows react/react dom to have versions >16.0.0

Hi Allen,
I 've looked into the implementation of paginator wrapper class and notice at the very end you return an array of objects. I am a bit new to this but the errors i get from VS 2017 says React does not allow you to do this correct ? Your codes: .... return [ <Base key="table" { ...this.props } data={ data } />, <Pagination key="pagination" ..... /> ];
In your other implementation for filter project where the wrapper class is very similar but it returns only a single React element. This works correctly when I included in my VS project. Your codes snippet: return ( <Base { ...this.props } data={ this.props.store.data } isDataChanged={ isDataChanged } cellEdit={ newCellEdit } /> ); ...
So is it possible the error is in the return statement for Paginator wrapper class. Because no matter what i did the error came back from VS almost pointing in this direction. VS error:
Error: PaginationWrapper.render(): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.
@AllenFang
Please ignore my comment above regarding returning multiple elements for React render. I 've just realised that React version 16 and above allow you to do this.
However, now I dont know how to fix this in VS 2017 to force it to load React/React Dom version 16 plus even though I have done appropriate updates and can see in VS IDE that these libraries show version above 16.0.0 but still I am getting runtime error .