azure-devops-extension-sdk | Client SDK for developing Azure DevOps extensions | Azure library
kandi X-RAY | azure-devops-extension-sdk Summary
kandi X-RAY | azure-devops-extension-sdk Summary
Client SDK for developing Azure DevOps extensions.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of azure-devops-extension-sdk
azure-devops-extension-sdk Key Features
azure-devops-extension-sdk Examples and Code Snippets
Community Discussions
Trending Discussions on azure-devops-extension-sdk
QUESTION
I'm trying to publish an extension by vsce, I logged in with the user access token, after the build its create a file named 'NadavShaked.my-first-extension v1.0.968.vsix' I'm trying to publish the extension to the marketplace by this command 'vsce publish' and received this error:
this is the guide I used https://code.visualstudio.com/api/working-with-extensions/publishing-extension
this is my azure-devops-extension.json file:
...ANSWER
Answered 2021-Nov-02 at 07:55vsce
is not the right command to publish to Azure devops.
In my package.json
, I used npm run publish-extension
or better npm run package-extension
and published it by hand.
QUESTION
I’ve tried to update a functional component that points to an azure-devops-ui/Filter
. I am using azure-devops-extension-sdk
that returns an async response, in order to use this component:
https://developer.microsoft.com/en-us/azure-devops/components/filter
inside a WorkItem on Azure DevOps
I’ve already code with both a class-based and function component using this.state
/componentDidMount
and useState
/useEffect
respectively. I followed this SO post.
However, I only can re-render the state. The UI component neither in a class nor in a functional component updates when the state is updated.
There are my two versions of the code, both them wait for the response and successfully update state. However, neither will wait for render of the UI.
General Component:
...ANSWER
Answered 2020-Apr-20 at 15:00Writing a functional react component is simple with the new React Hooks. In the example below, I'm using useState
and useEffect
. The useState
hook is synonymous with this.state/this.setState
in a class-based React component. The useEffect
hook is similar to componentDidMount
+componentDidUpdate
. It also is capable of being componentDidUnmount
.
The way the code will execute is from top to bottom. Because it's functional, it will run through once and render with the default state set at the argument to useState
. It will not block on getting data from the API in the useEffect
function. Thus, you need to be able to handle loading without having data. Anytime props.apiConfig
or props.id
changes, the component will re-render and all the useEffect
again. It will only call useEffect
if props.apiConfig
and props.id
do change after first run. The only nasty part is that useEffect
cannot be an async
function, so you have to call the function getDataWrapper
without using await
. When the data is received by the API, it will store the data in state
, which will trigger a re-render of the component.
To Summarize:
- Render once with default state
- Call
useEffect
, which callsgetDataWrapper
- return component with initial values in
useState
- Call
- Once data is received by the API in the
useEffect
/getDataWrapper
function, set the state viasetState
& setisLoading
tofalse
- Re-render the component with updated value that
setState
now contains- Avoid the
useEffect
control path since the values in the second argument ofuseEffect
have not changed. (eg:props.apiConfig
&props.id
).
- Avoid the
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install azure-devops-extension-sdk
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page