Skip to content

React Code Snippets for Visual Studio / Available in Visual Studio Marketplace

License

Notifications You must be signed in to change notification settings

waywardcode/ReactCodeSnippets

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ReactCodeSnippets

React Code Snippets for Visual Studio 2022 Community - Older versions for VS 2017 / 2019 available on the Marketplace

  • Have not requested a PR from the original developer - kickmeforpresident

If you need this Extension for VS2022 - clone, build (Release) and use the the vsix file in ../bin/Release

  • Changed version to 4.0 since, it will not work in older VS 2017 & 2019

Visual Studio Marketplace Visual Studio Marketplace Visual Studio Marketplace


imr

import React from 'react';

imrc

import React, { Component } from 'react';

imrpc

import React, { PureComponent } from 'react';

impt

import PropTypes from 'prop-types';

ims

import styled from 'styled-components';

imsc

import styled, { css } from 'styled-components';

imc

import { connect } from 'react-redux';

cdm

componentDidMount() {

}

cdc

componentDidCatch(error, info) {

}

cdu

componentDidUpdate(prevProps, prevState) {

}

cwm

componentWillMount() {

}

cwrp

componentWillReceiveProps(nextProps) {

}

cwum

componentWillUnmount() {

}

cwu

componentWillUpdate() {

}

sl

import React from 'react';

const Example = (prop) => (

);

export default Example;

slr

import React from 'react';

const Example = () => {
    return (

    );
}

export default Example;

ccs

import React, { Component } from 'react';

class Example extends Component {
    state = { }
    render() {
        return (

        );
    }
}

export default Example;

cccs

import React, { Component } from 'react';

class Example extends Component {
    constructor(props) {
        super(props);
        this.state = {  };
    }
    render() {
        return (

        );
    }
}

export default Example;

pcs

import React, { PureComponent } from 'react';

class Example extends PureComponent {
    state = {  }
    render() {
        return (

        );
    }
}

export default Example;

pccs

import React, { PureComponent } from 'react';

class Example extends PureComponent {
    constructor(props) {
        super(props);
        this.state = {  };
    }
    render() {
        return (

        );
    }
}

export default Example;

styc

const Example = styled.h1``;

estyc

export const Example = styled.h1``;

rrd

export default (state = , action) => {
    switch (action.type) {
        case :

        default:
            return state;
    }
};

ed

export default ;

About

React Code Snippets for Visual Studio / Available in Visual Studio Marketplace

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vim Snippet 97.0%
  • C# 3.0%