-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeScript #18
Comments
Hi :-) I don't have lots of experience with TS but I'm open to use it in the project. Let's wait with this for next week to see where we're at. Btw - do you think there's a chance it'll prevent newcomers from joining the project? (devs without TS knowledge) |
To be honest, yes, I think that this can add some friction to people without any prior TS experience, especially on more complex and non-trivial features. On the other hand, I believe that most of the experienced frontenv devs that worked on bigger projects will be familiar with TS at some level. From my personal experience, once a project grows to more than a few hundreds lines of code, TS has a positive ROI (meaning that it overall saves more time than you spend on it), and the ROI grows as the project gets even larger. Anyway, I'm available if/when you want. |
Maybe just add type definitions? |
TS can be added gradually, but from my experience: if you don't intend to eventually go TS all the way, and you don't have very disciplined developers in the team, then the types soon or later get out of sync and become a burden instead of an asset. It's a bit like doing DOM manipulation in React instead of using JSX. You can get away with it once or twice, but if you allow this to become a habit, it will get out of control and you'd end up with more mess than if you haven't used React at the first place. |
I think TS would be a net positive for the project, but maybe for now we could add propTypes? That will achieve type safety without adding the complications TS poses to devs inexperienced with it. |
I also think adding TS is a net positive. Simply having the ability to use it will accelerate development to some degree as well as invite over some developers that shy away from plain JS.. propTypes might be easier to start with but over time they are more cumbersome to maintain to some degree. |
@markVaykhansky I agree. I see propTypes as a temporary crutch. When we decide to move to TS we could get rid of them. But for now they could be useful. |
There's no real difference between adding proptypes and adding TS.
and you'll have the ability to type regular functions too (which you can't do with proptypes). I think TS is a must in a project with a large of amount of devs that aren't familiar with the codebase, and especially for a website with this scale. Since we're on CRA, adding it should super simple I say let's do it. We won't be hurting new devs but rather saving them from breaking the app, and we could have the confidence to add more junior devs to the project. |
+1 for TS |
Yalla. |
I feel like the "other side" wasn't heard enough. |
As numbers of contributers grow, and there are no unit-tests, bugs and crashed are waiting to happen. Either adding tests or TypeScript will make the app more resilient. I think TypeScript has better ROI. |
@idanen It seems like there's pretty much consensus among contributors who have worked with the source code in this discussion. Who knows, we might pivot the project to have another purpose after lockdown, so it might be wise to think about the learning curve and how we can attract more contributors. But for now our main goal is to be very fast in order to push the protest movement, under the current conditions, to new heights. |
In that case (deadline, no TS experience), adding TypeScript will slow down the progress and I would stick to what you know and works for now. |
Yeah, I get what you're saying. I won't have time to learn TypeScript at the position I'm at currently. So I don't know. I feel it's much more the active contributors and maintainers decision than mine. |
If the intent is to eventually add TypeScript, then there's a way to do it progressively, which should have a low impact on the pace of the project, while still getting some of the benefits:
|
If interested, I can add TypeScript support to the project. This will make it easier to make sure things don't break when other people work on the codebase.
The text was updated successfully, but these errors were encountered: