NPM Packages to make development setup easier and hopefully end up with cleaner code. All 3 make use of providers and hooks.
Package to make using azure AD authentication in your application easier by having a single provider for low effort code.
<NaitAzureADAuthProvider
config={{ clientId: "GUID" }}>
<Control />
</NaitAzureADAuthProvider>
Package to make fetching data easier, and also a possible replacement for redux, depending on your needs. Compatible with azure-ad-helpers by adding auth tokens to fetch calls.
var [state, loadState, setState] = useStateLoader<ReturnType>({
url: "someUrl",
data: {
name: "John",
},
});
Package to make working with signalR much easier.
const [connection, connectionStatus] = useSignalRConnection({
listeners: [
{
eventName: "ProdcutAdded",
handler: (productName: string) => {
//do something
},
},
...
],
onConnectionStarted: (connection) => {
connection.invoke("OnConnected");
},
});