aws-samples / aws-samples/amplify-vite-react-template

Documentation not Consistent!

Open
#11 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
109
Forks
261
PR merge metrics
No merged PRs in 30d

Description

Hey there! Thanks for this repo. @renebrandel @josefaidt

I followed the Quickstart and could add login and auth. Got the following file structure (please note `src/main.tsx`):
![image](https://github.com/user-attachments/assets/305bd57d-8dac-4120-9f2c-ff5bb91329c3)

Now I am trying to generate forms following this [tutorial](https://docs.amplify.aws/react/build-ui/formbuilder/). After I run `npx ampx generate forms` I get the same files as the instructions show.

![image](https://github.com/user-attachments/assets/95b6b7ab-0bfa-4fe2-a6d5-7ec46725f99c)

As per the Quickstart tutorial, everything is on React. However, the instructions in Formbuilder are misleading as there is no file called `src/main.jsx` for vite with React:
![image](https://github.com/user-attachments/assets/dfe42d2d-445d-4d16-ac12-87f6bd64edd1)

There is `src/main.tsx` for vite react.

So, when trying to `import { TodoCreateForm } from './ui-components';` from App.tsx, I get:
```
Could not find a declaration file for module '../ui-components/'. '../../ui-components/index.js' implicitly has an 'any' type.t
```

What is missing here?
Also, could the documentation be corrected to reflect the Quickstart tutorial (react+vite) all along?
Is `npx ampx generate forms` missing to generate a `main.ts` form that could be used with `main.tsx`?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.