GitXplorerGitXplorer
s

better-react-js-code-snippet-extension

public
27 stars
1 forks
0 issues

Commits

List of commits on branch main.
Verified
06e154074b488a3544fb16773ddefb844da22814

discontinued

ssharafdin committed 2 months ago
Verified
97e8c843fb7a183c313a69a989e223cbd88727bc

discontinued

ssharafdin committed 2 months ago
Unverified
a7bc813df07c5de634a5a3008ec0e2863a5e1719

added repo url

ssharafdin committed a year ago
Unverified
04d7071dd99b5e49a91e4f6bea81bfd76bc29044

1.0.0

ssharafdin committed a year ago
Unverified
b945a51a818c4b6d312858b4a135fc9b070c2b5c

0.2.0

ssharafdin committed a year ago
Unverified
65448d5f0f01723aa873fc5ff38158f45b35f4be

0.1.0

ssharafdin committed a year ago

README

The README file for this repository.

This extension is no longer maintained and has been discontinued.

Better React JS Code Snippet

This extension helps you to write ReactJs 10x faster.

Supported languages (file extensions)

  • JavaScript (.js)
  • ReactJS (.jsx)

How to use this extension?

Well, Create js or jsx file and start writing your code by using this extension, Simply writing the prefix you want, for example:
To generate a function component simply write rfc and enter or tab it will generate this:

import React from 'react';

function Name() {
  return (
    <div>
      <div>Name</div>
    </div>
  );
}

export default HelloWorld;

The methods are available for now

Prefix Method
ir Imports react
irc Imports React, { Component }
irrd Imports react and ReactDOM
ird Imports ReactDOM
irs Imports React & { useState }
irbh Imports React & the basic hooks
ibh Imports the basic hooks { useState, useEffect, useContext }
ipt import PropTypes from 'prop-types';
ipc Imports React & { PureComponent }
rcc Creates a React component class with ES6 module system
rcpc React Class Pure Component
cpc Adds a default constructor for the class that contains props and context as arguments
rrdc Creates a React component class connected to redux with dispatch
rafc Creates a React arrow function component
rafcp Creates a stateless React component as a named function with PropTypes
rfc Creates a React function component
afsc Arrow Function Syntax Component
fsc Function Syntax Component
ueh useEffect Hook
ush Declare a state variable using the useState Hook
uch Declare a context variable using the useContext Hook
urh Declare a ref variable using the useRef Hook
urdh Declare a reducer variable using the useReducer Hook
umh Declare a memo variable using the useMemo Hook
uth Declare a transition variable using the useTransition Hook
ren Render
cdm componentDidMount
cwm componentWillMount
cwrp componentWillReceiveProps
gds getDerivedStateFromProps
scu shouldComponentUpdate
cwu componentWillUpdate
cdu componentDidUpdate
cwun componentWillUnmount
cdc componentDidCatch
gsbu getSnapshotBeforeUpdate
sst Performs a shallow merge of nextState into current state

Keep Coding

import React from 'react';

class App extends React.Component {
  render() {
    return (
      <div>
        <h1>Happy coding!🤓</h1>
      </div>
    );
  }
}

export default App;

Developers

This extension developed by Sharafdin
GitHub | Twitter | LinkedIn