I’m trying to implement Lock v11 in a React app and I’m confused about:
-
Where do I initialize
Lock
? Inindex.js
orcomponentWillMount()
inApp.js
? -
Where do place the
lock.on('authenticated')
listener?
I currently initialize Lock through my reducer and placed the lock.on('authenticated')
listener in componentWillMount()
in App.js
but it’s not firing. I do see an access_token
in the URL but I’m not hitting the debugger I placed in the event listener.
I could use clarification on how to implement Lock v11 in a React app. Thanks.