This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useReducer } from "react"; | |
type ReducerInvokerMap<S, T> = { | |
[K in keyof T]:T[K] extends (this: S) => S | |
? () => void | |
: T[K] extends (this: S, arg: infer Arg) => S | |
? Arg extends object | |
? (arg: Arg) => void | |
: never | |
: never |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Quick and dirty way to run spa apps on rust actix server | |
use dotenvy::dotenv; | |
use std::env; | |
use actix_web::{HttpServer, App, Result}; | |
use actix_web::dev::{ServiceRequest, ServiceResponse}; | |
use actix_files as a_fs; | |
#[actix_web::main] | |
async fn main() -> std::io::Result<()> { | |
dotenv().ok(); |