Ligerx / TachiWeb-React

React front end for TachiWeb-Server
10 stars 4 forks source link

Consider migrating entire codebase over to TypeScript #86

Open Ligerx opened 4 years ago

Ligerx commented 4 years ago

This is probably a decently large effort and will also involve getting the API types changed as well. I think the biggest unknown will be with updating the typing of redux. I believe the way I'm currently typing it is not 'standard'. I'd want to further explore what a standard typed design of redux using the included typescript definitions actually looks like.

Example app of redux-starter-kit with typescript types https://github.com/markerikson/rsk-github-issues-experiment https://github.com/reduxjs/redux-starter-kit/blob/master/src/createAction.ts https://github.com/reduxjs/redux-thunk/blob/master/index.d.ts

example of how to get the store state type easily via typescript https://github.com/markerikson/rsk-github-issues-experiment/blob/master/src/store.ts

Ligerx commented 4 years ago

Given my recent migration to SWR hooks in https://github.com/Ligerx/TachiWeb-React/pull/123, I think this is more important now. SWR doesn't have any Flow types, only Typescript types.