mirror of
https://github.com/suren-atoyan/monaco-react.git
synced 2026-01-25 16:02:35 +00:00
coding style fixes
This commit is contained in:
parent
0b47d9450c
commit
95072eaeb6
@ -9,7 +9,9 @@ const loadingStyles = {
|
||||
};
|
||||
|
||||
function Loading({ content }) {
|
||||
return <div style={loadingStyles}>{content}</div>;
|
||||
return (
|
||||
<div style={loadingStyles}>{content}</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Loading;
|
||||
|
||||
@ -1,4 +0,0 @@
|
||||
import useMount from './useMount';
|
||||
import useUpdate from './useUpdate';
|
||||
|
||||
export { useMount, useUpdate };
|
||||
@ -1,5 +1,7 @@
|
||||
import { useEffect } from 'react';
|
||||
|
||||
const useMount = effect => useEffect(effect, []);
|
||||
function useMount(effect) {
|
||||
useEffect(effect, []);
|
||||
}
|
||||
|
||||
export default useMount;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { useEffect, useRef } from 'react';
|
||||
|
||||
const useUpdate = (effect, deps, applyChanges = true) => {
|
||||
function useUpdate(effect, deps, applyChanges = true) {
|
||||
const isInitialMount = useRef(true);
|
||||
|
||||
useEffect(
|
||||
@ -9,6 +9,6 @@ const useUpdate = (effect, deps, applyChanges = true) => {
|
||||
: effect,
|
||||
deps
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
export default useUpdate;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user