refactor: HMR for traits

This commit is contained in:
cha0s 2021-04-06 17:48:23 -05:00
parent b3570c4187
commit 3a8b39eaae
7 changed files with 22 additions and 9 deletions

View File

@ -4,6 +4,7 @@ import {join} from 'path';
import {JsonTabs, useJsonPatcher} from '@avocado/resource/persea'; import {JsonTabs, useJsonPatcher} from '@avocado/resource/persea';
import { import {
hot,
PropTypes, PropTypes,
React, React,
} from '@latus/react'; } from '@latus/react';
@ -160,4 +161,4 @@ Behaved.propTypes = {
path: PropTypes.string.isRequired, path: PropTypes.string.isRequired,
}; };
export default Behaved; export default hot(module)(Behaved);

View File

@ -5,6 +5,7 @@ import {Number} from '@avocado/persea';
import {Context} from '@avocado/behavior'; import {Context} from '@avocado/behavior';
import {Condition, Expressions} from '@avocado/behavior/persea'; import {Condition, Expressions} from '@avocado/behavior/persea';
import { import {
hot,
PropTypes, PropTypes,
React, React,
useEffect, useEffect,
@ -90,4 +91,4 @@ Alive.propTypes = {
path: PropTypes.string.isRequired, path: PropTypes.string.isRequired,
}; };
export default Alive; export default hot(module)(Alive);

View File

@ -3,7 +3,11 @@ import {join} from 'path';
import { import {
Number, Number,
} from '@avocado/persea'; } from '@avocado/persea';
import {PropTypes, React} from '@latus/react'; import {
hot,
PropTypes,
React,
} from '@latus/react';
import {useJsonPatcher} from '@avocado/resource/persea'; import {useJsonPatcher} from '@avocado/resource/persea';
const Directional = ({json, path}) => { const Directional = ({json, path}) => {
@ -67,4 +71,4 @@ Directional.propTypes = {
path: PropTypes.string.isRequired, path: PropTypes.string.isRequired,
}; };
export default Directional; export default hot(module)(Directional);

View File

@ -11,6 +11,7 @@ import {
vectorRangePropType, vectorRangePropType,
} from '@avocado/math/persea'; } from '@avocado/math/persea';
import { import {
hot,
memo, memo,
PropTypes, PropTypes,
React, React,
@ -179,4 +180,4 @@ Emitted.propTypes = {
path: PropTypes.string.isRequired, path: PropTypes.string.isRequired,
}; };
export default Emitted; export default hot(module)(Emitted);

View File

@ -2,6 +2,7 @@ import {join} from 'path';
import {JsonTabs} from '@avocado/resource/persea'; import {JsonTabs} from '@avocado/resource/persea';
import { import {
hot,
memo, memo,
PropTypes, PropTypes,
React, React,
@ -54,4 +55,4 @@ Emitter.propTypes = {
path: PropTypes.string.isRequired, path: PropTypes.string.isRequired,
}; };
export default Emitter; export default hot(module)(Emitter);

View File

@ -3,7 +3,11 @@ import './audible.scss';
import {join} from 'path'; import {join} from 'path';
import {useJsonPatcher} from '@avocado/resource/persea'; import {useJsonPatcher} from '@avocado/resource/persea';
import {PropTypes, React} from '@latus/react'; import {
hot,
PropTypes,
React,
} from '@latus/react';
const Audible = ({json, path}) => { const Audible = ({json, path}) => {
const patch = useJsonPatcher(); const patch = useJsonPatcher();
@ -105,4 +109,4 @@ Audible.propTypes = {
}; };
Audible.propTypes = {}; Audible.propTypes = {};
export default Audible; export default hot(module)(Audible);

View File

@ -6,6 +6,7 @@ import {Vector as VectorComponent} from '@avocado/math/persea';
import {Number} from '@avocado/persea'; import {Number} from '@avocado/persea';
import {JsonTabs, useJsonPatcher} from '@avocado/resource/persea'; import {JsonTabs, useJsonPatcher} from '@avocado/resource/persea';
import { import {
hot,
PropTypes, PropTypes,
React, React,
} from '@latus/react'; } from '@latus/react';
@ -80,4 +81,4 @@ Animated.propTypes = {
}; };
Animated.propTypes = {}; Animated.propTypes = {};
export default Animated; export default hot(module)(Animated);