0

I want to implement asyncComponent in laravel + react. Everything work Good before i tried asyncComponent.

When i try that return error :

Code :

import asyncComponent from '../component/asyncComponent';

const Home = asyncComponent(() => import('../pages/home') //line 9
  .then(module => module.default), { name: 'Home' });

Error:

Module build failed: SyntaxError: E:/xampp/htdocs/react/lara-react/blog-new/resources/js/back-end/layout/main.js: Unexpected token (9:34)

How to implement asyncComponent in laravel ?

2
  • What's on line 9 in E:/xampp/htdocs/react/lara-react/blog-new/resources/js/back-end/layout/main.js? Commented Dec 7, 2018 at 12:39
  • line 9 const Page1 = asyncComponent(() => import('./components/Page1') -@Jerodev Commented Dec 8, 2018 at 4:01

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.