This project aims to help React JS (and Next JS) developers by providing useful code snippets for those who are
tired of writing every day the same code structure 😴💻
Usage
This extension provides you some snippets that will gain some time for you. Including
Function Components declaration - with and without type - Hooks - including ContextAPI - Unit Test structures
and Next JS SSR and SSG functions declarations.
Supported Languages
JavaScript (.js)
TypeScript (.ts)
JavaScript React (.jsx)
TypeScript React (.tsx)
Snippets
📌The snippet result can differ depending whether you are in a Typescript or Javascript file because some snippets come with props declaration.
when file extension is (.ts) or (.tsx)
Shortcut
Result
!ef →
Creates an function component with simple export
!edf →
Creates a function component with default export
!rcd →
Creates a context and export its provider
!rue →
Declares useEffect
!rus →
Declares useState
!tcr →
Unit test structure that renders your component
!tcrcp →
Unit test structure that renders your component with Context Provider
!tcrrp →
Unit test structure that renders your component with Redux Provider
!nssg →
Declares Next JS getStaticProps function
!nssr →
Declares Next JS getServerSideProps function
License
Distributed under MIT License. See LICENSE to more information's.
Contact
If you have any doubt or suggestion, fell free to contact me 😉📲