Interviewer icon indicating copy to clipboard operation
Interviewer copied to clipboard

Refactor ProtocolScreen

Open wwqrd opened this issue 5 years ago • 0 comments

Can we improve the onClickNext(), onClickPrevious() methods?

Suggestions:

  • Generalise the skipToIndex logic so that it can be used by both methods
  • Can we make the distinction clearer between? interfaceRefInstance.clickPrevious(), promptBackward(), and this.props.changeStage(`${this.props.pathPrefix}/${skipToIndex}`);
  • Can we update the logic to remove the nested if/else?
  • Can we remove interfaceRefInstance? If not, can we make the distinction clearer between clickPrevious and promptBackward?

wwqrd avatar Jun 10 '19 08:06 wwqrd