From 94f8982881a1770dbd8282363be474347aae8695 Mon Sep 17 00:00:00 2001 From: Stepan Usatiuk Date: Sat, 22 Sep 2018 23:15:52 +0300 Subject: [PATCH] show loading text only after 200 ms --- client/src/components/App.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/client/src/components/App.js b/client/src/components/App.js index 5537209..5729a4b 100644 --- a/client/src/components/App.js +++ b/client/src/components/App.js @@ -9,17 +9,20 @@ import './App.css'; const LoadableTodosView = Loadable({ loader: () => import('./todolist/TodosView'), - loading: () => 'loading', + loading: () => loading, + delay: 200, }); const LoadableLoginForm = Loadable({ loader: () => import('./user/LoginForm'), - loading: () => 'loading', + loading: () => loading, + delay: 200, }); const LoadableSignupForm = Loadable({ loader: () => import('./user/SignupForm'), - loading: () => 'loading', + loading: () => loading, + delay: 200, }); export default class App extends React.PureComponent {