Linked Questions

Popular Questions

SystemJS with React native

Asked by At

I want to use systemjs inside react-native.

When I use following code in the browser systemjs register itself with global/window.

fetch('https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.18.17/system.src.js')
      .then(response => response.text())
      .then(txt => {
        eval(txt);
      })
      .catch(ex => {
        console.log(ex);
      });

I executed same code in expo AwesomeProject on the homescreen component and the above code does not throw any exceptions, but when I try to render all the globally registered objects I don't see SystemJs/System.

  1. First question I have - Is it even possible to register systemjs and use it with react-native?

  2. If the answer to first question is yes, then is it the correct way to eval(Systemjs)?

  3. If not is there any other method I can use to access system js?

I have seen couple of projects on github like react-native-eval and react auto updater, but that is not what I want.

Anyone can give me some insight?

Related Questions