ReactCodeSnippets
React Code Snippets for Visual Studio 2017 & 2019
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 ;