-
Notifications
You must be signed in to change notification settings - Fork 189
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
Fixes #1557: Initial Typescript and NextJS Documentation #1695
Conversation
Nice! I was going to comment to include the cheatsheet and the nextjs ts examples but you got both of them already. Great starting point so far 👍 |
docs/typescript.md
Outdated
|
||
When working on a new component for the Telescope frontend, please consider the following: | ||
|
||
- We do not use React.FC/React.FunctionalComponent when making our components. The reason for this can be found [here](https://github.com/facebook/create-react-app/pull/8177). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrap React.FC
and React.FunctionalComponent
in backticks.
docs/typescript.md
Outdated
|
||
- We do not use React.FC/React.FunctionalComponent when making our components. The reason for this can be found [here](https://github.com/facebook/create-react-app/pull/8177). | ||
- We require all components being created to strictly be exported directly inside the components folder. This is due to the way NextJS processes requests, where we build our pages in the `pages` folder using the components made there. | ||
- Our style and theme choices can be found [here](./theme-and-colours.md). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of linking this, let's integrate this document into that file and rename it to docs/front-end.md
, so all of our front-end notes are in one place.
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/humphd/telescope/9hbym1cjq |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff.
Issue This PR Addresses
This PR fixes #1557
Type of Change
Description
With the shift to NextJS and Typescript for our frontend instead of Gatsby, we decided to include some new documentation to point new Telescope developers to some very useful links that they can refer to. This is currently a draft-in-progress.
The theme decisions for NextJS was not included here since we already have a md file discussing styling and theme choices. I therefore, included a link to the Material-UI/Typescript documentation for future developers working on styling and theming.
Checklist