Skip to content

Commit

Permalink
Switch useLayoutEffect with useEffect
Browse files Browse the repository at this point in the history
  • Loading branch information
Vadim Demedes committed Sep 23, 2019
1 parent 8abcd68 commit 44e9fa5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/hooks/use-input.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import {useLayoutEffect, useContext} from 'react';
import {useEffect, useContext} from 'react';
import {StdinContext} from '..';

export default inputHandler => {
const {stdin, setRawMode} = useContext(StdinContext);

useLayoutEffect(() => {
useEffect(() => {
setRawMode(true);

return () => {
setRawMode(false);
};
}, [setRawMode]);

useLayoutEffect(() => {
useEffect(() => {
const handleData = data => {
let input = String(data);
const key = {
Expand Down

0 comments on commit 44e9fa5

Please sign in to comment.