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 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': () => ({
|
||||||
|
|
|
@ -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(() => {
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user