Skip to content

Commit c33e209

Browse files
committed
added debug and sourcemaps, bumped version
1 parent 051399b commit c33e209

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

lib/TourProvider.jsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useReducer } from 'react'
1+
import React, { useReducer, useEffect } from 'react'
22
import generateActions from './actions'
33
import reducer, { initialState, generateSelectors } from './reducer'
44
import { getStepConfigType } from './utils'
@@ -55,6 +55,17 @@ export default props => {
5555
}
5656
}
5757

58+
useEffect(() => {
59+
if (tourConfig.debug && console) {
60+
console.log({
61+
'react-hook-tour': {
62+
state,
63+
tourController
64+
}
65+
})
66+
}
67+
}, [state])
68+
5869
// listen for step transitions and properly handle them
5970
useStepChange(tourController)
6071

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-hook-tour",
3-
"version": "1.0.0-rc.3",
3+
"version": "1.0.0-rc.4",
44
"description": "A product tour library using React Hooks",
55
"main": "dist/index.js",
66
"module": "lib/index.js",

webpack.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
const nodeExternals = require('webpack-node-externals')
22

33
module.exports = {
4+
devtool: 'source-map',
45
entry: './lib/index.js',
56
output: {
67
filename: 'index.js',

0 commit comments

Comments
 (0)