the next bootstrapped project is coming and I am thinking about which stack to choose…
Some questions:
Is there a “best-practise“ code-example somewhere that shows how an awesome Meteor-React-Typescript codebase would look like?
What tooling would you choose for when working with freelancers? I am planning to collaborate with freelance programmers and an exotic stack will probably limit my choice of potential programmers.
I’d like to have your feedback on which “tooling“ (=npm / athmosphere-packages) to use.
So far the plan is:
Meteor
React
Typescript (is it worth it? What do you think?)
Material-UI (although I am struggling a bit getting into the styledComponents-concept - I am coming from bootstrap and still love working with less/sass)
to be honest classical meteor using collections and pub/sub, simpleschema etc. does not play very well with typescript. You might get typechecking for simpl-schema definition, but not for entities in your database and that is probably what you are wishing for. At least this was my intention when i started to use typescript.
I personally recommend using graphql. You can create typescript types using npx apollo codegen:generate --target=typescript based on your backend-api and use these generated types in your client-code. They match exactly the data you requested from the backend. So if you remove something because you think you don’t need it anymore and regenerate the types, you will immediatly notice if you still used it somewhere. This really gives you piece-of-mind when writing client code and is also very convenient, because you can auto-complete through your entities’ properties.
Data used in multiple components can easily be shared in a common hook. just import it, use it in your component and its return value will be magically typed.