Hi Everyone. Welcome to my second published package for react.js.
I'm going to show you an easy way to embed GeoGebra Maths App to your React project.
This is not an official GeoGebra-project.
Made with create-react-library
Try the demo: https://saunaaa.github.io/react-redux-geogebra
npm install --save react-redux-geogebra
or
yarn add react-redux-geogebra
import React from 'react'
import { ReactGeoGebra } from 'react-redux-geogebra'
const App = () => {
return (
<ReactGeoGebra
width='800'
height='600'
showMenuBar
showToolBar
showAlgebraInput
/>
)
}
To use the provided hooks wrap the component in the ReactGeoGebraProvider Component
import { ReactGeoGebraProvider } from 'react-redux-geogebra'
ReactDOM.render(
<ReactGeoGebraProvider>
<App />
</ReactGeoGebraProvider>,
document.getElementById('root')
)
import {
useStoreState,
useStoreActions,
useTypedSelector,
useDispatch
} from 'react-redux-geogebra'
ReactGeoGebra.defaultProps = {
appName: 'classic',
width: 800,
height: 600,
showToolBar: true,
showAlgebraInput: true,
showMenuBar: true
}
A list of the GeoGebra props is available at the GeoGebra-website.
To interact with the embedded GeoGebra app you can use the GeoGebra-API.
Check out the GeoGebra license agreement on their webpage.
https://www.geogebra.org/license
MIT © saunAAA