reactsocialnetwork icon indicating copy to clipboard operation
reactsocialnetwork copied to clipboard

[feature]: Merging project to use TypeScript

Open gbowne1 opened this issue 1 year ago • 4 comments

Is your feature request related to a problem? Please describe.

A couple of recommendations came through in the psst 4 months to merge this into using TypeScript.

Personally I feel

Describe the solution you would like

We can decide as a community if we need all of the features TypeScript offers to change to TypeScript.

Describe the alternatives you have tried

We are currently using JSX for our components with some .js for our controllers and also prop types. This has been working fihe.

Additional context

We can discuss this new feat here.

gbowne1 avatar Apr 24 '23 10:04 gbowne1

Using TypeScript would allow to create interfaces, it's kind of pattern to predefine object properties types. It would throw error if it doesn't fit during development. While components props can be handled by PropTypes, we can use interface multiple times within component (not sure if PropTypes can do that too).

image

That's example from TypeScript docs. All .js and .jsx files could be transformed into .ts and .tsx without any error because TypeScript is a superset of JavaScript and all JS code run perfectly in .ts files.

pawel975 avatar Apr 29 '23 16:04 pawel975

It will be something to do in the future once we get enough working. I can do prop types. I really need to sit and learn Typescript.

gbowne1 avatar Apr 29 '23 18:04 gbowne1

Sure, if you change your mind I can handle this migration.

pawel975 avatar Apr 30 '23 17:04 pawel975

Great, good to know. I think its a great idea. Several have mentioned it I think we should to this when the majority of our features are complete and we still have a long way to go. I wanna get dashboards, messaging/chat, groups and friends up and working at least somewhat. We are almost done with Events.

gbowne1 avatar Apr 30 '23 18:04 gbowne1