improve app readmes and component name
This commit is contained in:
@ -1,11 +1,6 @@
|
||||
|
||||
```
|
||||
go mod init api-golang
|
||||
go get -u github.com/gin-gonic/gin
|
||||
go get -u github.com/lib/pq
|
||||
```
|
||||
|
||||
|
||||
```
|
||||
go run src/main.go
|
||||
```bash
|
||||
mkdir go-workspace
|
||||
export GOPATH=$PWD/go-workspace
|
||||
go mod download
|
||||
go run main.go
|
||||
```
|
||||
@ -1,8 +1,6 @@
|
||||
```
|
||||
npm init
|
||||
npm install express pg
|
||||
```
|
||||
|
||||
```
|
||||
node src/index.js
|
||||
```bash
|
||||
nvm ls
|
||||
nvm use node 19.4
|
||||
npm install
|
||||
npm run dev
|
||||
```
|
||||
@ -1,5 +1,10 @@
|
||||
```
|
||||
npm create vite@latest
|
||||
npm i @tanstack/react-query axios
|
||||
```
|
||||
|
||||
```
|
||||
nvm ls
|
||||
nvm use node 19.4
|
||||
npm install
|
||||
npm run dev
|
||||
```
|
||||
|
||||
@ -10,7 +10,7 @@ import './App.css'
|
||||
|
||||
const queryClient = new QueryClient();
|
||||
|
||||
function Example(props) {
|
||||
function CurrentTime(props) {
|
||||
const { isLoading, error, data, isFetching } = useQuery({
|
||||
queryKey: [props.api],
|
||||
queryFn: () =>
|
||||
@ -37,8 +37,8 @@ export function App() {
|
||||
return (
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<h1>Hey Team! 👋</h1>
|
||||
<Example api="/api/golang/"/>
|
||||
<Example api="/api/node/"/>
|
||||
<CurrentTime api="/api/golang/"/>
|
||||
<CurrentTime api="/api/node/"/>
|
||||
<ReactQueryDevtools initialIsOpen={false} />
|
||||
</QueryClientProvider>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user