DEV Community

Ryota Murakami
Ryota Murakami

Posted on

React AppState was migrated to TypeScript!

Alt Text

Now React AppState was migrated to TypeScript!!
This was built by JavaScript + babel + flow until now, But codebase are small enough to rewrite short time, and SWR is good example about npm by TypeScript I came across look πŸ‘€

Babel free

TypeScript build stuff is so simple than babel!
Because TypeScript don't need many plugins like babel-plugin-uuuaahh.
Only part you need leaning is Compiler Options that was written on tsconfig.json.
Actually there are many options I couldn't master all in a few days but leaning resource is centralize on the single page docs πŸ“

Auto generation type definition files

Before migrate I was put in hand made index.d.ts file for TypeScript.
This is so painful to create and has a possibility untrusted 😭

You can ignore annoying type error πŸ˜†

This is as same as Flow!
If you faced unessential type system correctness you can ignore that error with // @ts-ignore code comments.

And you can customize how strong typing depends on do you preferred with Compiler Options noImplicitAny setting etc.
I'm grad to I still work with JavaScript that expanded soft typing system πŸ˜„πŸŽ‰

Finaly, I'll more learn about TypeScript Compiler Options, Effective ESLint settings, and be figure out favorite code writing style!
Also I wanna introduce about React AppState after lately, I'm grad if that will useful for developer making small website/webapp! πŸ‘¨β€πŸ’»

Thank you for reading my poor English post! β˜•οΈ
Welcome comment feel free If you know more better English, If you know more tech things, or other your special πŸ˜€πŸš€

Discussion (2)

Collapse
mateiadrielrafael profile image
Matei Adriel • Edited on

Nice:) I first saw you on reactiflux, and i'm happy your lib is coming together like that!

Collapse
malloc007 profile image
Ryota Murakami Author

Thank you!
reactflux forks gave me a lof of feedback that was so useful for improve library.
I appreciate it! πŸ˜†