Skip to content

Ganesh2116/React-sinppets

Repository files navigation

react-code-snippets README

A snippet library which includes simple daily use snippets

Languages supported

  1. Javascript(js)

  2. Typescript(ts)

  3. Javascriptreact(jsx)

  4. Typescriptreact(tsx)

All Commands - 7

  1. cl - Console Log
  2. cls - Console Log String
  3. clc - Console Section
  4. fc - functional Component
  5. us - functional Component with useState
  6. fcp - Arrow functional Component with Props
  7. race - React functional Component Export

Snippets

cl - Console Log

console.log();

cls - Console Log String

console.log("");

clc - Console Log sections

console.log();
console.count();
console.table();
console.error();
console.info();

race - React Arrow functional Component Export

import React from "react";

const FileName = () => {
  return <></>;
};
export default FileName;

fc - functional Component

const componentname = () => {
  return <></>;
};

us - functional Component with useState

const componentname = () => {
  const [use, setUse] = useState(0);
  return <></>;
};

fcp - functional Component with Props

const ComponentName = ({ props }) => {
  return <></>;
};

Contributing

The repo