Connecting the ask page

We are going to follow a similar pattern to connect the ask page to our Redux store. Let's get started:

  1. In AskPage.tsx, let's change the import statements from React, that is, Form.tsx and QuestionsData.tsx, so that they look as follows:
import React, { FC, useEffect } from 'react';import {  Form,  required,  minLength,  Values,  SubmitResult} from './Form';import { PostQuestionData, QuestionData } from './QuestionsData';
  1. Let's add the following import statements:
import { connect } from 'react-redux';import { ThunkDispatch } from 'redux-thunk';import {  postQuestionActionCreator,  AppState,  clearPostedQuestionActionCreator} from './Store';import { AnyAction } from 'redux';
  1. Add a props interface for the data and ...

Get ASP.NET Core 3 and React now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.