Kukuh  Pratama

Kukuh Pratama

1623633442

Vite Quick Tip - Vite with React and Typescript

A quick video on how to use Vite instead of create-react-app. I’ll show how to bootstrap a React application from scratch with Vite and also how to refactor a create-react-app into Vite instead.

#typescript #react #vite

What is GEEK

Buddha Community

Vite Quick Tip - Vite with React and Typescript
Autumn  Blick

Autumn Blick

1598839687

How native is React Native? | React Native vs Native App Development

If you are undertaking a mobile app development for your start-up or enterprise, you are likely wondering whether to use React Native. As a popular development framework, React Native helps you to develop near-native mobile apps. However, you are probably also wondering how close you can get to a native app by using React Native. How native is React Native?

In the article, we discuss the similarities between native mobile development and development using React Native. We also touch upon where they differ and how to bridge the gaps. Read on.

A brief introduction to React Native

Let’s briefly set the context first. We will briefly touch upon what React Native is and how it differs from earlier hybrid frameworks.

React Native is a popular JavaScript framework that Facebook has created. You can use this open-source framework to code natively rendering Android and iOS mobile apps. You can use it to develop web apps too.

Facebook has developed React Native based on React, its JavaScript library. The first release of React Native came in March 2015. At the time of writing this article, the latest stable release of React Native is 0.62.0, and it was released in March 2020.

Although relatively new, React Native has acquired a high degree of popularity. The “Stack Overflow Developer Survey 2019” report identifies it as the 8th most loved framework. Facebook, Walmart, and Bloomberg are some of the top companies that use React Native.

The popularity of React Native comes from its advantages. Some of its advantages are as follows:

  • Performance: It delivers optimal performance.
  • Cross-platform development: You can develop both Android and iOS apps with it. The reuse of code expedites development and reduces costs.
  • UI design: React Native enables you to design simple and responsive UI for your mobile app.
  • 3rd party plugins: This framework supports 3rd party plugins.
  • Developer community: A vibrant community of developers support React Native.

Why React Native is fundamentally different from earlier hybrid frameworks

Are you wondering whether React Native is just another of those hybrid frameworks like Ionic or Cordova? It’s not! React Native is fundamentally different from these earlier hybrid frameworks.

React Native is very close to native. Consider the following aspects as described on the React Native website:

  • Access to many native platforms features: The primitives of React Native render to native platform UI. This means that your React Native app will use many native platform APIs as native apps would do.
  • Near-native user experience: React Native provides several native components, and these are platform agnostic.
  • The ease of accessing native APIs: React Native uses a declarative UI paradigm. This enables React Native to interact easily with native platform APIs since React Native wraps existing native code.

Due to these factors, React Native offers many more advantages compared to those earlier hybrid frameworks. We now review them.

#android app #frontend #ios app #mobile app development #benefits of react native #is react native good for mobile app development #native vs #pros and cons of react native #react mobile development #react native development #react native experience #react native framework #react native ios vs android #react native pros and cons #react native vs android #react native vs native #react native vs native performance #react vs native #why react native #why use react native

Verdie  Murray

Verdie Murray

1636236360

How to add Cypress for Create React App with TypeScript

In this lesson we look at how to add #cypress with code coverage support for a Create #React App application with #TypeScript.

In the end you will have a developer flow that can save you a bunch of time in testing effort 

#react-native #react #cypress #typescript 

Kukuh  Pratama

Kukuh Pratama

1623633442

Vite Quick Tip - Vite with React and Typescript

A quick video on how to use Vite instead of create-react-app. I’ll show how to bootstrap a React application from scratch with Vite and also how to refactor a create-react-app into Vite instead.

#typescript #react #vite

Template Repo for React + Typescript + Vite

Template Repo for React + Typescript + Vite

Introduction

This is a template repo for projects built with react and typescript on the basis of vite.

Features

  • Support React Hooks.
  • Build on Vite.
  • Typescript in use.
  • Code checking and formatting support.
  • Basic components from antd
  • GraphQL support.
  • axios installed.
  • Route configuration and guarding supported by @syy11cn/config-router.
  • Git hooks support.
  • Use yarn for package management.

Usage

Fork

Fork this repo to your account first.

Rename

Rename the repo using the name of your project.

Clone

Clone the repo to your local folder.

Develop

cd <path-to-your-cloned-repo>
yarn
yarn dev

image-20211030153313730

More Scripts

For more yarn scripts, please refer to package.json

{
  "scripts": {
    "dev": "vite",
    "build": "vite build",
    "serve": "vite preview",
    "precommit": "lint-staged",
    "lint:less": "stylelint --fix \"src/**/*.less\" --syntax less",
    "lint-staged:js": "eslint --ext .js,.jsx,.ts,.tsx",
    "lint:js": "eslint --cache --ext .js,.jsx,.ts,.tsx ./src",
    "lint:fix": "eslint --fix --cache --ext .js,.jsx,.ts,.tsx",
    "lint:prettier": "prettier --check \"src/**/*\" --end-of-line auto",
    "prettier": "prettier -c --write \"src/**/*\""
  }
}

Packages

Here are the packages installed (in package.json).

{
  "dependencies": {
    "react": "^17.0.0",
    "react-dom": "^17.0.0"
  },
  "devDependencies": {
    "@apollo/client": "^3.4.16",
    "@syy11cn/config-router": "^1.0.5",
    "@types/react": "^17.0.33",
    "@types/react-dom": "^17.0.10",
    "@types/react-router-dom": "^5.3.2",
    "@typescript-eslint/eslint-plugin": "^5.2.0",
    "@typescript-eslint/parser": "^5.2.0",
    "@vitejs/plugin-react": "^1.0.0",
    "antd": "^4.16.13",
    "axios": "^0.24.0",
    "eslint": "^7.10.0",
    "eslint-plugin-react": "^7.26.1",
    "eslint-plugin-react-hooks": "^4.2.0",
    "esprima": "^4.0.1",
    "graphql": "^15.0.0",
    "husky": "^7.0.4",
    "lint-staged": "^11.2.6",
    "prettier": "^2.4.1",
    "react-router-dom": "^5.3.0",
    "stylelint": "^14.0.1",
    "stylelint-config-standard": "^23.0.0",
    "typescript": "^4.4.4",
    "vite": "^2.6.4"
  }
}
  • react for building user interfaces.
  • @apollo/client for sending gql requests.
  • react-router-dom and @syy11cn/config-router for route configuration and guarding.
  • typescript and peer plugins for writing .ts or .tsx files in react project.
  • esprima for parsing typescript grammar.
  • vite for the base build tool.
  • eslint, stylelint, prettier and editorconfig for code checking and formatting.
  • husky and lint-staged for git hooks configuration.
  • antd for basic components.

Folders

src
│  App.css
│  App.tsx
│  favicon.svg
│  index.css
│  logo.svg
│  main.tsx
│
├─apis
├─components
├─routes
│      index.ts
│
├─typings
│      images.ts
│
├─utils
└─views
        ErrorPage.tsx

Configuration

Modify the following config files.

  • .editorconfig
  • .eslintrc
  • .prettierrc
  • .stylelintrc
  • tsconfig.json
  • vite.config.js

About

Chinese Introduction

CLICK HERE to check the Chinese introduction doc to this repo on Lark.


Author: syy11cn
Source code: https://github.com/syy11cn/react-ts-vite-template
License: MIT license

#react-native #react #typescript #vite 

Paris  Kessler

Paris Kessler

1656723600

React Vite Admin: React, Recoil, React Query, React Hooks, TypeScript,

React + Recoil + React Query + React Hooks + Typescript + Axios + Vite - Starter

This Starter utilizes React, Recoil, React Query, React Hooks, Typescript, Axios And Vite.

中文文档

Screenshot

Installation

Clone this repo and install all dependencies

 git clone https://github.com/ychengcloud/react-vite-admin.git

 cd react-vite-admin

 yarn install

Development

yarn dev 

Build

yarn build

Publish

yarn dist

Contributing

Your contributions are always welcome! Click Here to read the guidelines.

Thanks


Author: ychengcloud
Source code: https://github.com/ychengcloud/react-vite-admin
License:

#vue #vite #react-native #typescript