IssueRaiser

Dynamic import not working

There has been a conversation around this problem on different thread, please see: https://github.com/facebook/react-native/issues/6391#issuecomment-329048372 The problem is essentially that as of now it is not possible to import or require modules dynamically or programatically (using a variable). With import() in Stage 3 in TC39 this feature is fast becoming a standard language element and the lack of this facility in React Native is becoming all the more limiting. Also, as per the above conversation there are very legitimate scenarios (dependency injection for example), where such lazy and conditional loading is a must. Based on all this I would like to make a feature request for this (please let me know if this is not the right forum for doing so).

Posted by jarecsni on Sep 13, 2017, 8:26 AM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.4,500 issues0 comments

github (Software)

Dynamic import not working

jarecsniSep 13, 2017, 8:26 AM

There has been a conversation around this problem on different thread, please see: https://github.com/facebook/react-native/issues/6391#issuecomment-329048372 The problem is essentially that as of now it is not possible to import or require modules dynamically or programatically (using a variable). With import() in Stage 3 in TC39 this feature is fast becoming a standard language element and the lack of this facility in React Native is becoming all the more limiting. Also, as per the above conversation there are very legitimate scenarios (dependency injection for example), where such lazy and conditional loading is a must. Based on all this I would like to make a feature request for this (please let me know if this is not the right forum for doing so).

Comments (0)

No comments yet. Start the discussion.

Comment on this issue