React JS: Unable to find module

Hello Play.js,

I’m trying to get started with play.js for Reactjs, but I’m running into difficulties understanding how I setup imports from root. Relative linking looks to work for me, but I’m unable

Project Setup:
I’m running my project on an iPad. My project is in /workspace/play.js/React/HelloWorld.

app.jsx snippet:
import HelloWorld from ‘HelloWorld.jsx’; // <- This fails
import HelloWorld from ‘./HelloWorld.jsx’; //<- This succeeds

Error Message:
ERROR in ./src/app.jsx
Module not found: Error: Can’t resolve ‘HelloWorld.jsx’ in ‘/private/var/mobile/Containers/Shared/AppGroup/2081A045-899D-4D8F-96D2-63168CB30063/File Provider Storage/workspace/play.js/React/HelloWorld/src’

Hi @ggleep :wave:

Do you mean React.js or React Native projects? If you meant React.js I’m afraid that the import syntax is not supported yet. You need to use require instead.

Hi @nakiostudio, do you have an idea as to when the import syntax will be supported in the app for React.JS?

Hi @granticus :wave:

I’m working on it right now.