小编Jos*_*den的帖子

在复合操作中使用 Secrets GitHub

我正在创建一个复合操作,并尝试使用 GitHub 提供的机密,但遇到错误,指出未找到机密。

这可以使用您的 action.yml 重新创建,如下所示:

name: 'test'
description: 'test'
runs:
  using: 'composite'
  steps:
    - name: Create Branch
      run: echo "git branch test"
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      shell: bash
Run Code Online (Sandbox Code Playgroud)

复合操作似乎不知道秘密,这使得通过它们运行 git 命令变得困难。

github-actions

34
推荐指数
1
解决办法
2万
查看次数

故事书错误:找不到与“组件按钮-页面”匹配的故事

我似乎无法解决我在 Storybook 中遇到的这个错误。我有以下名为 Button.stories.mdx 的文件:

import { Meta, Story, ArgsTable, Canvas } from '@storybook/addon-docs/blocks';
import Button from './Button';
import ButtonStory from './Button.stories.tsx'

<Meta title="Components/Button" component={Button} />

export const Template = (args) => <Button {...args } />

# Button Component

---

This Button component is supposed to handle all states for a button. It extends off of the HTML button type so that you should have all native HTML features that a button would provide.
We may make some of these …
Run Code Online (Sandbox Code Playgroud)

storybook

11
推荐指数
3
解决办法
2万
查看次数

将 gatsby-plugin-typescript 添加到 GatsbyJS“React 未定义”

我创建了 hello world GatsbyJS 应用程序,然后添加了 typescript 插件,我立即收到错误“React 未定义”。我经历了添加“import * as React from 'react'”的步骤;但我仍然在 /cache/app.js 中抛出相同的错误。我不确定接下来的步骤。

你好世界 GatsybyJS:https ://www.gatsbyjs.org/tutorial/part-zero/#create-a-gatsby-site

添加打字稿:https ://www.gatsbyjs.org/packages/gatsby-plugin-typescript/ ?= by-config.js

有没有人遇到过同样的问题?

typescript gatsby

7
推荐指数
3
解决办法
2378
查看次数

如何从useState挂钩访问setState中的回调

是否有人设法在react 16.8中为useState挂钩的更新部分创建同步回调?我一直在寻找一个这样的东西,以便我可以使用第3方库处理同步动作,而我似乎无法满足我的需求。

如果有人对成功完成此操作的人员有任何引用,请在此处添加。

干杯,

reactjs react-hooks

4
推荐指数
1
解决办法
2448
查看次数