Skip to content

Instantly share code, notes, and snippets.

Avatar

Shay Cojocaru shayc

  • Microsoft
  • Israel
View GitHub Profile
View temp
Fluent UI uses CSS-in-JS - We should opt for that as well.
Formik vs react-hook-form
Formik is older, components take longer to mount, re-renders the entire form on field change.
react-hook-form was written to replace Formik, better mount and rendering performance
Both Formik and react-hook-form have good community adoption (above 1mil npm weekly downloads)
Formik - https://www.npmjs.com/package/formik
Size - 13kB
View index.html
<html>
<head>
<title>Touch logger</title>
<style>
html,
body {
width: 100%;
height: 100%;
}
View gist:df9c8d47f575523df24a926949901b40
<input
type="file"
accept=".obf, .obz"
onChange={event => {
readFiles(event.target.files);
}}
/>
export async function readFiles(files: FileList): Promise<BoardSet[]> {
const obz = await parseOBZ(await readOBZFile(file))