From 88391fa174ef4bc22578f0c373b0d772225ef109 Mon Sep 17 00:00:00 2001 From: cha0s Date: Mon, 25 Jan 2021 16:01:37 -0600 Subject: [PATCH] refactor: react exports --- packages/react/src/index.js | 2 ++ packages/socket/src/hooks/use-socket-packet.js | 4 +--- packages/socket/src/hooks/use-socket.js | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/react/src/index.js b/packages/react/src/index.js index db5d724..3339661 100644 --- a/packages/react/src/index.js +++ b/packages/react/src/index.js @@ -2,6 +2,8 @@ export {default as React} from 'react'; export {default as ReactDom} from 'react-dom'; export {default as PropTypes} from 'prop-types'; +export * from 'react'; + export default { hooks: { '@latus/core/config': () => ({ diff --git a/packages/socket/src/hooks/use-socket-packet.js b/packages/socket/src/hooks/use-socket-packet.js index a3f3a2f..ca1b3e7 100644 --- a/packages/socket/src/hooks/use-socket-packet.js +++ b/packages/socket/src/hooks/use-socket-packet.js @@ -1,9 +1,7 @@ -import {React} from '@latus/react'; +import {useEffect} from '@latus/react'; import useSocket from './use-socket'; -const {useEffect} = React; - export default function useSocketPacket(fn, deps = []) { const socket = useSocket(); useEffect(() => { diff --git a/packages/socket/src/hooks/use-socket.js b/packages/socket/src/hooks/use-socket.js index 19b15e5..a0a5d3e 100644 --- a/packages/socket/src/hooks/use-socket.js +++ b/packages/socket/src/hooks/use-socket.js @@ -1,6 +1,5 @@ -import {LatusContext, React} from '@latus/react/client'; - -const {useContext} = React; +import {useContext} from '@latus/react'; +import {LatusContext} from '@latus/react/client'; export default function useSocket() { const latus = useContext(LatusContext);