useTrixtaReaction
React hook used to interact with a Trixta reaction for a given roleName.
import { useTrixtaReaction } from '@trixtateam/trixta-js-core';
const {
hasRoleAccess,
isInProgress,
latestResponse,
loading,
latestInstance,
instances,
initialData,
hasResponse,
submitTrixtaReaction,
clearReactionResponses,
} = useTrixtaReaction<TInitialData,TSuccessType,TErrorType>({ roleName:"",
reactionName:"",
requestForEffect:false,
loadingStatusRef:"",
debugMode: false,
setTimeoutEventAsErrorEvent: false,
clearResponsesOnCallback: false,
onSuccess:(success)=>{},
onError:(errror)=>{}
});Options
Returns
Last updated
Was this helpful?