refactor: react exports
This commit is contained in:
parent
acaa4193df
commit
88391fa174
|
@ -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': () => ({
|
||||
|
|
|
@ -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(() => {
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user