Skip to content

msantic/react-useeffect-dynamic-import

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setup

git clone [email protected]:msantic/react-useeffect-dynamic-import.git
cd react-useeffect-dynamic-import

In the terminal, open two tabs. In the first one (remote component server), run:

cd remotecomponent
npm install
npm run start

In the second tab, run:

cd app
npm install
npm run start

Open browser at http://localhost:4444 and check the developer tools console for errors while trying to import and render the remote React component. If the useEffect function in the RemoteComponent.jsx file is commented out, everything works fine.

With useEffect code the error is:

remotecomponent.js:1 Uncaught TypeError: Cannot read properties of null (reading 'useEffect')

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published