Skip to content
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

feat(template): create initial template #1

Merged
merged 9 commits into from
Apr 7, 2022
Merged

Conversation

jamcry
Copy link
Collaborator

@jamcry jamcry commented Dec 30, 2021

Description

Forked from official typescript template, added some of our common components and configurations.
Includes:

  • Basic folder structure
  • Fundamental CSS overrides
  • Router and two routes as an example
  • Page components
  • Linter configurations and dependencies
  • Pre-commit hook with Husky

Notes

How to test on local?

You can clone the repo, checkout to this branch, then go up one direction, and run:

npx create-react-app cra-test-app --template file:./cra-template-hipo-typescript

This should work just like default cra template.

To be discussed

These are not included atm, I suggest we add them (in a next PR), we can discuss:

  • Async process/component
  • App context
    • Maybe we can implement app state with a simple login logic. User can enter name and login by clicking on a button.

You can write if you have any additional suggestions

template/README.md Outdated Show resolved Hide resolved

function App() {
return (
<Suspense fallback={<RouteLoading />}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is good to have also ErrorBoundary component at least at the top level.
error-boundary

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why, but we don't have it in the latest projects, I'll check it and we can discuss on the team meeting

Copy link
Contributor

@akgunberk akgunberk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for you effort. It looks great!
I left some comments for some the parts may be improved from my point of view.

template.json Outdated Show resolved Hide resolved
@jamcry jamcry mentioned this pull request Jan 13, 2022
@jamcry
Copy link
Collaborator Author

jamcry commented Jan 13, 2022

I'll update imports to only lazy import "Help" route

Copy link

@yasincaliskan yasincaliskan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks!

@jamcry jamcry merged commit 271fe83 into main Apr 7, 2022
@jamcry jamcry deleted the feat/init-template branch April 7, 2022 06:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants