December 2019
Intermediate to advanced
598 pages
12h 21m
English
Let's carry out the following steps to create a function that sets up the SignalR client connection object:
import { HubConnectionBuilder, HubConnectionState, HubConnection,} from '@aspnet/signalr';
const [question, setQuestion] = useState<QuestionData | null>(null);const setUpSignalRConnection = async (questionId: number) => { // TODO - setup connection to real-time SignalR API // TODO - handle Message function being called // TODO - handle ReceiveQuestion function being called // TODO ...