1675071360
Live Demo: https://todo-ar363.vercel.app/
VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).
npm install
npm run dev
npm run build
npm run test:e2e:dev
This runs the end-to-end tests against the Vite development server. It is much faster than the production build.
But it's still recommended to test the production build with test:e2e
before deploying (e.g. in CI environments):
npm run build
npm run test:e2e
npm run lint
Author: ar363
Source code: https://github.com/ar363/todolist-vue-ts
1675071360
Live Demo: https://todo-ar363.vercel.app/
VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).
npm install
npm run dev
npm run build
npm run test:e2e:dev
This runs the end-to-end tests against the Vite development server. It is much faster than the production build.
But it's still recommended to test the production build with test:e2e
before deploying (e.g. in CI environments):
npm run build
npm run test:e2e
npm run lint
Author: ar363
Source code: https://github.com/ar363/todolist-vue-ts
1654588030
TypeScript Deep Dive
I've been looking at the issues that turn up commonly when people start using TypeScript. This is based on the lessons from Stack Overflow / DefinitelyTyped and general engagement with the TypeScript community. You can follow for updates and don't forget to ★ on GitHub 🌹
If you are here to read the book online get started.
Book is completely free so you can copy paste whatever you want without requiring permission. If you have a translation you want me to link here. Send a PR.
You can also download one of the Epub, Mobi, or PDF formats from the actions tab by clicking on the latest build run. You will find the files in the artifacts section.
All the amazing contributors 🌹
Share URL: https://basarat.gitbook.io/typescript/
Author: Basarat
Source Code: https://github.com/basarat/typescript-book/
License: View license
1603496280
The best way to learn something is by doing. This tutorial will help you learn how to build your own todo list app with React hooks and TypeScript. Try this easy tutorial, build your own todo list app, and get better in JavaScript, React and TypeScript.
You can find the code on my GitHub.
The goal for this tutorial is to build your own todo list app. About the app in general. This todo list app will have very simple interface and it will focus on the most important features, i.e. create, check off and delete todos. About code. You will use React and React hooks, mostly useState
hook.
There will be one occasion where you will also use useRef
hook. Since this todo list app will utilize React hooks for managing state there is no need to use class components. So, you will build this app only with functional components. When it comes to styling your todo list app, you will use external CSS stylesheets.
One last things. First every todo item will have a unique id. These ids will be generated when the todo item is created. You will use this id to mark the todo as complete or to remove it. To make this easier, while following good practices and avoiding using indexes, you will use shortid package.
As the first thing let’s create the basic app for your todo list app. We can do this very fast with the help of create-react-app. You can use this package with npm init react-app react-hooks-todo-list-app-ts --typescript
, npx create-react-app react-hooks-todo-list-app-ts --typescript
or yarn create react-app react-hooks-todo-list-app-ts --typescript
. If you don’t want to use TypeScript, omit the --typescript
flag at the end of the command.
These commands will create starting template for your todo list app, with workflow setup and almost all necessary dependencies. There is one dependency you will need to install manually, the shortid
and types for this package. So, use npm i shortid
and npm i -D @types/shortid
, yarn add shortid
and yarn add -D @types/shortid
or pnpm i shortid
and pnpm i -D @types/shortid
.
There are some assets, such as React logo, that came with the app template. You can remove it because you will not need it. A very simple version of your package.json
should look similar to this:
{
"name": "react-todo-list-hooks-ts",
"version": "1.0.0",
"description": "Simple Todo list app built with React hooks and TypeScript.",
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
],
"main": "src/index.tsx",
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
},
"dependencies": {
"react": "16.11.0",
"react-dom": "16.11.0",
"shortid": "2.2.15"
},
"devDependencies": {
"@types/react": "16.9.11",
"@types/react-dom": "16.9.4",
"@types/shortid": "^0.0.29",
"react-scripts": "3.2.0",
"typescript": "3.7.2"
}
}
If you decide to use TypeScript, your tsconfig
should look similar to this:
{
"include": [
"./src/*"
],
"compilerOptions": {
"lib": [
"dom",
"es2015"
],
"jsx": "react",
"target": "es5",
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true
}
}
As the last thing, below is the final structure of this todo list app project. You can use this as you work on this tutorial to orient yourself. With that, you are ready to start working on your todo list app.
react-hooks-todo-list-app-ts/
├─node_modules
├─public
│ ├─favicon.ico
│ ├─index.html
│ ├─manifest.json
│ └─robots.txt
├─src
│ ├─components
│ │ ├─todo-form.tsx
│ │ ├─todo-item.tsx
│ │ └─todo-list.tsx
│ ├─styles
│ │ └─styles.css
│ ├─index.tsx
│ ├─interfaces.ts
│ └─react-app-env.d.ts
├─ package.json
└─ tsconfig.json
#typescript #reactjs #typescript #react hooks #todo list app
1640973720
The beyonic APIs Docs Reference: https://apidocs.beyonic.com/
Discuss Beyonic API on slack
The Beyonic API is a representational state transfer, REST based application programming interface that lets you extend the Beyonic dashboard features into your application and systems, allowing you to build amazing payment experiences.
With the Beyonic API you can:
For usage, general questions, and discussions the best place to go to is Beyhive Slack Community, also feel free to clone and edit this repository to meet your project, application or system requirements.
To start using the Beyonic Python API, you need to start by downloading the Beyonic API official Python client library and setting your secret key.
Install the Beyonic API Python Official client library
>>> pip install beyonic
Setting your secrete key.
To set the secrete key install the python-dotenv modeule, Python-dotenv is a Python module that allows you to specify environment variables in traditional UNIX-like “.env” (dot-env) file within your Python project directory, it helps us work with SECRETS and KEYS without exposing them to the outside world, and keep them safe during development too.
Installing python-dotenv modeule
>>> pip install python-dotenv
Creating a .env file to keep our secrete keys.
>>> touch .env
Inside your .env file specify the Beyonic API Token .
.env file
BEYONIC_ACCESS_KEY = "enter your API "
You will get your API Token by clicking your user name on the bottom left of the left sidebar menu in the Beyonic web portal and selecting ‘Manage my account’ from the dropdown menu. The API Token is shown at the very bottom of the page.
import os
import beyonic
from dotenv import load_dotenv
load_dotenv()
myapi = os.environ['BEYONIC_ACCESS_KEY']
beyonic.api_key = myapi
# Listing account: Working.
accounts = beyonic.Account.list()
print(accounts)
#Listing currencies: Not working yet.
'''
supported_currencies = beyonic.Currency.list()
print(supported_currencies)
Supported currencies are: USD, UGX, KES, BXC, GHS, TZS, RWF, ZMW, MWK, BIF, EUR, XAF, GNF, XOF, XOF
'''
#Listing networks: Not working yet.
"""
networks = beyonic.Network.list()
print(networks)
"""
#Listing transactions: Working.
transactions = beyonic.Transaction.list()
print(transactions)
#Listing contact: Working.
mycontacts = beyonic.Contact.list()
print(mycontacts)
#Listing events: Not working yet.
'''
events = beyonic.Event.list()
print(events)
Error: AttributeError: module 'beyonic' has no attribute 'Event'
'''
Docker file
FROM python:3.8-slim-buster
COPY . .
COPY ./requirements.txt ./requirements.txt
WORKDIR .
RUN pip install -r requirements.txt
CMD [ "python3", "getExamples.py" ]
Build docker image called demo
>>> docker build -t bey .
Run docker image called demo
>>>docker run -t -i bey
Now, I’ll create a Docker compose file to run a Docker container using the Docker image we just created.
version: "3.6"
services:
app:
build: .
command: python getExamples.py
volumes:
- .:/pythonBeyonicExamples
Now we are going to run the following command from the same directory where the docker-compose.yml file is located. The docker compose up command will start and run the entire app.
docker compose up
NB: The screenshot below might differ according to your account deatils and your transcations in deatils.
To stop the container running on daemon mode use the below command.
docker compose stop
Output
Contributing to this repository. All contributions, bug reports, bug fixes, enhancements, and ideas are welcome, You can get in touch with me on twitter @HarunMbaabu.
Download Details:
Author: HarunMbaabu
Source Code: https://github.com/HarunMbaabu/BeyonicAPI-Python-Examples
License:
1645499052
Vue Vben Admin is a free and open source middle and back-end template. Using the latest vue3
, vite2
, TypeScript
and other mainstream technology development, the out-of-the-box middle and back-end front-end solutions can also be used for learning reference.
Test account: vben/123456
Open the project in Gitpod (free online dev environment for GitHub) and start coding immediately.
TypeScript
git clone https://github.com/anncwb/vue-vben-admin.git
cd vue-vben-admin
pnpm install
pnpm serve
pnpm build
You are very welcome to join!Raise an issue Or submit a Pull Request。
Pull Request:
git checkout -b feat/xxxx
git commit -am 'feat(function): add xxxxx'
git push origin feat/xxxx
pull request
reference vue specification (Angular)
feat
Add new featuresfix
Fix the problem/BUGstyle
The code style is related and does not affect the running resultperf
Optimization/performance improvementrefactor
Refactorrevert
Undo edittest
Test relateddocs
Documentation/noteschore
Dependency update/scaffolding configuration modification etc.workflow
Workflow improvementsci
Continuous integrationtypes
Type definition file changeswip
In developmentIf these plugins are helpful to you, you can give a star support
English | 中文
Download Details:
Author: vbenjs
Source Code: https://github.com/vbenjs/vue-vben-admin
License: MIT
#vue #vue3 #vite #typescript