I have try to create a webdatarocks basic table using React. But i have continuously encountered the following issues. Why this following error occurs. How to overcome this?enter image description here
Asked
Active
Viewed 492 times
0
-
That error is caused by attempting to do something like `undefined.prop`. Show your full code? – Bas May 26 '22 at 07:07
-
import * as WebDataRocksReact from "react-webdatarocks"; function App() { return (
1 Answers
0
Here is a short guide on how to embed WebDataRocks in your React project:
- If you don’t have a React application yet, create one by running this command in the console:
npx create-react-app my-app
cd my-app
- Get the WebDataRocks React module from npm:
npm install react-webdatarocks
- Add WebDataRocks’ styles to the
src/index.js
file:
import 'webdatarocks/webdatarocks.css'
- Import the WebDataRocksReact module to the src/App.js file:
import * as WebDataRocksReact from 'react-webdatarocks';
- Open src/App.js and add WebDataRocks there using the WebDataRocksReact.Pivot component:
function App() {
return (
<div className="App">
<WebDataRocksReact.Pivot
toolbar={true}
componentFolder="https://cdn.webdatarocks.com/"
width="100%"
report="https://cdn.webdatarocks.com/reports/report.json"
/>
</div>
);
}
- Run your application:
npm start
- Open
http://localhost:3000/
in the browser — WebDataRocks is embedded into your React project.

solja
- 71
- 4
-
On Removing React strict mode, Now it is working fine. Thanks for your Response. – Abdul Bashith Jun 17 '22 at 06:45