This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Webpack configuration | |
const TerserPlugin = require('terser-webpack-plugin'); | |
const webpack = require('webpack'); | |
const path = require('path'); | |
const isProduction = process.env.NODE_ENV === 'production'; | |
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); | |
const Visualizer = require('webpack-visualizer-plugin'); | |
module.exports = { | |
mode: isProduction ? 'production' : 'development', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState } from 'react'; | |
const useRequest = ({ request }) => { | |
const [result, setResult] = useState(null); | |
const [error, setError] = useState(null); | |
const [isRunning, setIsRunning] = useState(false); | |
async function execute(args) { | |
setIsRunning(true); | |
try { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { View, StyleSheet, LayoutRectangle } from 'react-native'; | |
import Svg, { Line, Polygon } from 'react-native-svg'; | |
interface ArrowProps { | |
start: LayoutRectangle; | |
end: LayoutRectangle; | |
} | |
const Arrow: React.FC<ArrowProps> = ({ start, end }) => { |