Skip to content

Commit

Permalink
[update] readme file with examples
Browse files Browse the repository at this point in the history
Signed-off-by: ScottAgirs <[email protected]>
  • Loading branch information
ScottAgirs committed Jun 27, 2020
1 parent e16238e commit 9869374
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.4.1] - 2020-06-26

### UPDATE

- readme file with expanded snippets

## [1.4.0] - 2020-06-26

### ADDED
Expand Down
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,39 @@ static async getInitialProps({ Component, ctx }) {",
}
```
### gsp - exports getStaticProps()
```javascript
export async function getStaticProps(context) {
return {
props: { | }, // will be passed to the page component as props
}
}
```
### gspaths - exports getStaticPaths()
```javascript
export async function getStaticPaths() {
return {
paths: [
{ params: { | } } // See https://nextjs.org/docs/basic-features/data-fetching#the-paths-key-required
],
fallback: | // See https://nextjs.org/docs/basic-features/data-fetching#fallback-true
};
}
```
### gssp - exports getServerSideProps()
```javascript
export async function getServerSideProps(context) {
return {
props: {}, // will be passed to the page component as props
};
}
```
### imlnk - import Next.js Link
```javascript
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "Next.js React Snippets by iJS",
"description": "React Snippets (ES6) tailored for Next.js apps",
"publisher": "iJS",
"version": "1.4.0",
"version": "1.4.1",
"repository": {
"type": "git",
"url": "https://github.com/ijsto/reactnextjssnippets"
Expand Down

0 comments on commit 9869374

Please sign in to comment.