Skip to content

Commit 4980b65

Browse files
Ryandi Tjiam-allanson
authored andcommitted
[v2][tut. part 7] Rename boundActionCreators to actions (#5293)
1 parent 7c113e2 commit 4980b65

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

docs/tutorial/part-seven/index.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ fields.
111111
```javascript{3,4,6-11}
112112
const { createFilePath } = require(`gatsby-source-filesystem`)
113113
114-
exports.onCreateNode = ({ node, getNode, boundActionCreators }) => {
115-
const { createNodeField } = boundActionCreators
114+
exports.onCreateNode = ({ node, getNode, actions }) => {
115+
const { createNodeField } = actions
116116
if (node.internal.type === `MarkdownRemark`) {
117117
const slug = createFilePath({ node, getNode, basePath: `pages` })
118118
createNodeField({
@@ -151,8 +151,8 @@ our pages—what are their paths, what template component do they use, etc.
151151
```javascript{15-34}
152152
const { createFilePath } = require(`gatsby-source-filesystem`)
153153
154-
exports.onCreateNode = ({ node, getNode, boundActionCreators }) => {
155-
const { createNodeField } = boundActionCreators
154+
exports.onCreateNode = ({ node, getNode, actions }) => {
155+
const { createNodeField } = actions
156156
if (node.internal.type === `MarkdownRemark`) {
157157
const slug = createFilePath({ node, getNode, basePath: `pages` })
158158
createNodeField({
@@ -163,7 +163,7 @@ exports.onCreateNode = ({ node, getNode, boundActionCreators }) => {
163163
}
164164
}
165165
166-
exports.createPages = ({ graphql, boundActionCreators }) => {
166+
exports.createPages = ({ graphql, actions }) => {
167167
return new Promise((resolve, reject) => {
168168
graphql(`
169169
{
@@ -214,8 +214,8 @@ Then update `gatsby-node.js`
214214
const path = require(`path`)
215215
const { createFilePath } = require(`gatsby-source-filesystem`)
216216
217-
exports.onCreateNode = ({ node, getNode, boundActionCreators }) => {
218-
const { createNodeField } = boundActionCreators
217+
exports.onCreateNode = ({ node, getNode, actions }) => {
218+
const { createNodeField } = actions
219219
if (node.internal.type === `MarkdownRemark`) {
220220
const slug = createFilePath({ node, getNode, basePath: `pages` })
221221
createNodeField({
@@ -226,8 +226,8 @@ exports.onCreateNode = ({ node, getNode, boundActionCreators }) => {
226226
}
227227
}
228228
229-
exports.createPages = ({ graphql, boundActionCreators }) => {
230-
const { createPage } = boundActionCreators
229+
exports.createPages = ({ graphql, actions }) => {
230+
const { createPage } = actions
231231
return new Promise((resolve, reject) => {
232232
graphql(`
233233
{

0 commit comments

Comments
 (0)