refactor: react exports

This commit is contained in:
cha0s 2021-01-25 16:01:37 -06:00
parent acaa4193df
commit 88391fa174
3 changed files with 5 additions and 6 deletions

View File

@ -2,6 +2,8 @@ export {default as React} from 'react';
export {default as ReactDom} from 'react-dom'; export {default as ReactDom} from 'react-dom';
export {default as PropTypes} from 'prop-types'; export {default as PropTypes} from 'prop-types';
export * from 'react';
export default { export default {
hooks: { hooks: {
'@latus/core/config': () => ({ '@latus/core/config': () => ({

View File

@ -1,9 +1,7 @@
import {React} from '@latus/react'; import {useEffect} from '@latus/react';
import useSocket from './use-socket'; import useSocket from './use-socket';
const {useEffect} = React;
export default function useSocketPacket(fn, deps = []) { export default function useSocketPacket(fn, deps = []) {
const socket = useSocket(); const socket = useSocket();
useEffect(() => { useEffect(() => {

View File

@ -1,6 +1,5 @@
import {LatusContext, React} from '@latus/react/client'; import {useContext} from '@latus/react';
import {LatusContext} from '@latus/react/client';
const {useContext} = React;
export default function useSocket() { export default function useSocket() {
const latus = useContext(LatusContext); const latus = useContext(LatusContext);