npm install @storybook/react --save-dev
npm install @storybook/addons @storybook/addon-actions @storybook/addon-knobs @storybook/addon-notes --save-dev
This file contains hidden or 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
{ | |
"name": "", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"dependencies": { | |
"react": "^16.12.0", | |
"react-dom": "^16.12.0" | |
}, | |
"devDependencies": { |
This file contains hidden or 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
# Logs | |
logs | |
*.log | |
npm-debug.log* | |
yarn-debug.log* | |
yarn-error.log* | |
lerna-debug.log* | |
# Diagnostic reports (https://nodejs.org/api/report.html) | |
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json |
This file contains hidden or 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
{ | |
"name": "", | |
"version": "0.1.0", | |
"description": "", | |
"scripts": { | |
"build": "rollup -c", | |
"dev": "rollup -c -w", | |
"test": "jest", | |
"clear": "taskkill /f /im node.exe || killall -9 node", | |
"fontmini": "node utils/fontMinify" |
This file contains hidden or 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
#!/bin/sh | |
git filter-branch --env-filter ' | |
OLD_EMAIL="要修改的email" | |
CORRECT_NAME="正確的user.name" | |
CORRECT_EMAIL="正確的user.email" | |
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ] |
This file contains hidden or 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 ReactDOM from 'react-dom' | |
import { StoreContext } from 'redux-react-hook' | |
import App from './App' | |
import store from './store/configureStore' | |
import prestate from './store/prestate' | |
const app = (state = {}) => { | |
ReactDOM.render( |
- install
yarn add -D tailwindcss twin.macro autoprefixer babel-plugin-macros styled-components
This file contains hidden or 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
function blobToDataURI(blob, callback) { | |
const reader = new FileReader() | |
reader.readAsDataURL(blob) | |
reader.onload = function (e) { | |
callback(e.target.result) | |
} | |
} |
This file contains hidden or 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
const App = () =>{ | |
const [conunt,setConunt] = useState(1) | |
return ( | |
<div> | |
{Array(conunt).fill(<RepeatCompnent/>)} | |
</div> | |
) | |
} |
prepare
- rewrite fetch to catch httpcode
const httpCodeFetch = async ({ url, config = initialConfig }) => {
const res = await fetch(url, config)
if (res.status === 204) return {}
if (res.ok) {
return res.json()
OlderNewer