score:0

Accepted answer
const Total = ({ total, testFinished }) => {
  const { finishedCount, totalCount, isPaussed, timeLeft, timerTick } = total;
  return (
    <div className="test-total">
      <QuestionCounter
        finishedCount={finishedCount}
        totalCount={totalCount}
        testFinished={testFinished}
      />
      <FinishButton testFinished={testFinished} />
      <TimeCounter
        timeLeft={timeLeft}
        testFinished={testFinished}
        setTimer={setTimer}
        timerTick={timerTick}
      />
      <PauseButton isPaussed={isPaussed} />
    </div>
  );
};

score:0

import React from “react”;
import { connect } from “react-redux”;

class MyCom extensa React.Component {

    componentDidMount () {
          const { action } = this.props;

          action();
     }

     render () {
     .....
     }
}

const toState = state => ({....});
const toDispatch = {
   action
};

export default connect(toState, toDispatch)(MyCom);

Related Query

More Query from same tag