improve app readmes and component name

This commit is contained in:
sid palas
2023-02-19 08:50:07 -05:00
parent c813cdd7ce
commit 92f640e252
4 changed files with 19 additions and 21 deletions

View File

@ -1,11 +1,6 @@
```bash
``` mkdir go-workspace
go mod init api-golang export GOPATH=$PWD/go-workspace
go get -u github.com/gin-gonic/gin go mod download
go get -u github.com/lib/pq go run main.go
```
```
go run src/main.go
``` ```

View File

@ -1,8 +1,6 @@
``` ```bash
npm init nvm ls
npm install express pg nvm use node 19.4
``` npm install
npm run dev
```
node src/index.js
``` ```

View File

@ -1,5 +1,10 @@
``` ```
npm create vite@latest npm create vite@latest
npm i @tanstack/react-query axios
``` ```
```
nvm ls
nvm use node 19.4
npm install
npm run dev
```

View File

@ -10,7 +10,7 @@ import './App.css'
const queryClient = new QueryClient(); const queryClient = new QueryClient();
function Example(props) { function CurrentTime(props) {
const { isLoading, error, data, isFetching } = useQuery({ const { isLoading, error, data, isFetching } = useQuery({
queryKey: [props.api], queryKey: [props.api],
queryFn: () => queryFn: () =>
@ -37,8 +37,8 @@ export function App() {
return ( return (
<QueryClientProvider client={queryClient}> <QueryClientProvider client={queryClient}>
<h1>Hey Team! 👋</h1> <h1>Hey Team! 👋</h1>
<Example api="/api/golang/"/> <CurrentTime api="/api/golang/"/>
<Example api="/api/node/"/> <CurrentTime api="/api/node/"/>
<ReactQueryDevtools initialIsOpen={false} /> <ReactQueryDevtools initialIsOpen={false} />
</QueryClientProvider> </QueryClientProvider>
); );