+++ /dev/null
-import React, { useEffect, useState, useRef} from 'react';
-import {connect } from 'react-redux';
-import { toggleDrawerState } from '../store/actionCreators/system';
-
-const Option = (props) => {
- const mounted = useEffect;
- const updated = useEffect;
- const firstRender = useRef(true)
- const [gameState,updateGameState] = useState({
- firstRender : true,
-
- })
- mounted(() => {
- updateGameState({
- ...gameState,
- tutorialVisible: true
- })
- firstRender.current = false;
- return function cleanup(){
- // clean up logic
- }
- },[])
-
- updated(() =>{
- if(!firstRender.current){
- console.log("update only")
- }
- return function cleanup(){
-
- }
- })
-
- // this.props.updateGameData({scrap: 1000, robots: 5}).then(console.log(this.props.gameDataReducer));
-
- return (
- <div className="glmto-option">
- option
- </div>
- );
-
-}
-
-const mapDispatchToProps = { toggleDrawerState }
-const mapStateToProps = state => state
-export default connect(mapStateToProps, mapDispatchToProps)(Option);
\ No newline at end of file