@startup-booster/move-mobx
Advanced tools
Comparing version 0.1.24 to 0.1.25
const { observable } = require('mobx'); | ||
const { connect: baseConnect } = require('@startup-booster/move'); | ||
const { useEffect, useMemo, useState, createContext, useContext, createElement } = require('react'); | ||
const debounce = require('lodash.debounce'); | ||
const debounce = require('lodash/debounce'); | ||
@@ -68,3 +68,7 @@ /** @type {function(string, MoveOptions): MoveMobxClient} */ | ||
const ConnectionProvider = ({ url, renderBeforeConnection = false, options = {}, children }) => { | ||
const connection = useMemo(() => connect(url, options), []); | ||
console.log('Rendering connection provider'); | ||
const connection = useMemo(() => { | ||
console.log('Connecting'); | ||
return connect(url, options); | ||
}, []); | ||
const [connected, setConnected] = useState(false); | ||
@@ -92,2 +96,5 @@ | ||
const useMoveValue = (connection, path, { defaultValue = undefined, previewSet = true } = {}) => { | ||
useEffect(() => { | ||
console.log('[debug] -> ', previewSet); | ||
}, [previewSet]); | ||
return useMemo(() => { | ||
@@ -109,3 +116,3 @@ const x = () => { | ||
return result; | ||
}, [connection, path, defaultValue, previewSet]); | ||
}, [connection, connection.data.user, path, defaultValue, previewSet]); | ||
}; | ||
@@ -133,3 +140,3 @@ | ||
return result; | ||
}, [connection, collection, defaultValue, previewSet]); | ||
}, [connection, connection.data.user, collection, defaultValue, previewSet]); | ||
}; | ||
@@ -136,0 +143,0 @@ |
{ | ||
"name": "@startup-booster/move-mobx", | ||
"version": "0.1.24", | ||
"version": "0.1.25", | ||
"main": "move-mobx.js", | ||
"license": "MIT", | ||
"dependencies": { | ||
"@startup-booster/move": "0.1.24" | ||
"@startup-booster/move": "0.1.25" | ||
}, | ||
@@ -9,0 +9,0 @@ "peerDependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4989
147
+ Added@startup-booster/move@0.1.25(transitive)
+ Addedisomorphic.js@0.2.5(transitive)
+ Addedlib0@0.2.99(transitive)
+ Addedyjs@13.6.21(transitive)
- Removed@startup-booster/move@0.1.24(transitive)
Updated@startup-booster/move@0.1.25