Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Code snippets for React/React Native and extra libs

License

NotificationsYou must be signed in to change notification settings

walteribeiro/full-react-snippets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VersionInstallRatings

Table of Contents

Usage

After install this snippets add this inside your settings

"editor.snippetSuggestions": "top",

Snippets List

ES7

SnippetsContent
edlEslint Disable Line
imstImport Statement
impImport
imnImport No Module Name
imeImport Everything
imaImport As
edExport Default
exdExport Destructing
exaExport As
enfExport Named Function
edfExport Default Function
metMethod
freFor Each
fofFor Of
finFor Inf
anfnAnonymous Function
nfnNamed Function
dobDestructing Object
darDestructing Array
stiSet Interval
stoSet TimeOut
promPromise
casConsole Assert
cclConsole Clear
ccoConsole Count
cdiConsole Dir
cerConsole Error
cgrConsole Group
cgeConsole Group End
clgConsole Log
ctrConsole Trace
cwaConsole Warn
cinConsole Info
cmComment Block
cmmbComment Big Block
cblComment Big Line

GraphQL

SnippetsContent
graphqlGraphQL For Component
expgqlExport GraphQL

PropTypes

SnippetsContent
imptImport PropTypes
ptaProp Type Array
ptarProp Type Array Required
ptbProp Type Bool
ptbrProp Type Bool Required
ptfProp Type Func
ptfrProp Type Func Required
ptnProp Type Number
ptnrProp Type Number Required
ptoProp Type Object
ptorProp Type Object Required
ptsProp Type String
ptsrProp Type String Required
ptndProp Type Node
ptndrProp Type Node Required
ptelProp Type Element
ptelrProp Type Element Required
ptiProp Type Instance Of
ptirProp Type Instance Of Required
pteProp Type Enum
pterProp Type Enum Required
ptetProp Type One Of Type
ptetrProp Type One Of Type Required
ptaoProp Type Array Of
ptaorProp Type Array Of Required
ptooProp Type Object Of
ptoorProp Type Object Of Required
ptshProp Type Shape
ptshrProp Type Shape Required
ptypesStatic Prop Types

HOC

SnippetsContent
hocreduxHOC With Redux
hocHOC

React Native

SnippetsContent
rncReact Native Component
rnceReact Native Component Export
rncreduxReact Native Class Component Redux
rnfcReact Native Functional ComponentNew
imrnReact Native Import
rnstyleReact Native StyleNew

React

SnippetsContent
imrImport React
imrcImport React, { Component }
imrcpImport React, { Component } & PropTypes
imrpcImport React, { PureComponent }
imrpcpImport React, { PureComponent } & PropTypes
rccReact Class Compoment
rceReact Class Export Component
rfeReact Functional Export Component
rfepReact Functional Export Component With PropTypes
rfcReact Functional ComponentUpdated
rfcpReact Functional Component With PropTypesUpdated
rcepReact Class Export Component With PropTypes
rpcReact Class Pure Component
rpcpReact Class Pure Component With PropTypes
rccpReact Class Compoment PropTypes
rconstClass Constructor
estEmpty State
dsfpGet Derived State From Props
sbuGet Snapshot Before Update
cdcComponent Did Catch
cdmComponent Did Mount
cdmaComponent Did Mount (Arrow func)
scuShould Component Update
scuaShould Component Update (Arrow func)
cdupComponent Did Update
cdupaComponent Did Update (Arrow func)
cwunComponent Will Unmount
cwunaComponent Will Unmount (Arrow func)
cwmComponent Will Mount[Deprecated]
cwmaComponent Will Mount (Arrow func) -[Deprecated]
cwrComponent Will Receive Props[Deprecated]
cwraComponent Will Receive Props (Arrow func) -[Deprecated]
cwupComponent Will Update[Deprecated]
cwupaComponent Will Update (Arrow func) -[Deprecated]
renComponent Render
sstComponent Set State Object
ssfComponent Set State Func
propsComponent Props
stateComponent State

Redux

SnippetsContent
reduxImport Redux Statement
rpfRedux Pure Function
rpcRedux Pure Function Const
rcreduxReact Class Compoment Redux
reduxmapMapping To Props
rxactionRedux Action
rxconstRedux Const
rxreducerRedux Reducer
rxselectRedux Selector

React Router

SnippetsContent
imrrimport { BrowserRouter as Router, Route } from 'react-router-dom'
imnlimport { NavLink } from 'react-router-dom'
imwrimport { withRouter } from 'react-router'
routerreact-router Router template
routereact-router Route component
navlinkreact-router NavLink component

Testing

SnippetsContent
descDescribe Block
testTest Block
titIt Block
stestSetup Test
sjtestSetup Test With Enzyme To Json
sntestSetup React Native Test
snrtestSetup React Native Test With Redux

Hooks

SnippetsContent
useStateuseState Hook
useEffectuseEffect Hook
useContextuseContext Hook
useReduceruseReducer Hook
useCallbackuseCallback Hook
useMemouseMemo Hook
useRefuseRef Hook
useImperativeHandleuseImperativeHandle Hook
useLayoutEffectuseLayoutEffect Hook
useDebugValueuseDebugValue Hook

Reactotron

SnippetsContent
tron-rReactotron Config ReactNew
tron-redux-rReactotron Redux Config for ReactNew
tron-rnReactotron Config for React NativeNew
tron-redux-rnReactotron Redux Config for React NativeNew
ctlReactotron Console LogNew
ctwReactotron Console WarnNew
cteReactotron Console ErrorNew

Styled Components

SnippetsContent
styled-rStyled Components File for ReactNew
styled-rnStyled Components File for React NativeNew
stcStyled ComponentNew

Others

SnippetsContent
apiAxios APINew
root-reducerRoot ReducerNew
root-sagaRoot SagaNew
root-sagaRoot SagaNew
duckDuckNew
rsduckRedux Sauce DuckNew
csCreate StoreNew

License

Distributed under the MIT license. SeeLICENSE for more information.

Contact

Walter Ribeiro -Github -walterjunioranalise@gmail.com


[8]ページ先頭

©2009-2025 Movatter.jp