Can we integrate react component into Aurelia project?

Viewed 1708

I have created one react component and build it using webpack and deployed on server. I want to integrate this component into Aurelia Project.

I tried using below npm module: https://www.npmjs.com/package/aurelia-react-loader

In above module mentioned, component name need pass into html file. like in example my-react-component.js is passing into html file.

But my React Component is loading into root in html tag using below code:

    import React from 'react';
    import ReactDOM from 'react-dom';
    import App from './App';
    ReactDOM.render((
      <App/>
    ), document.getElementById('root'));

and after running webpack module, it is creating one JavaScript file that is called index_bundle.js file. Here imported App module is main js component. It is rendering into index.html on root element via ReactDOM.

So I am not sure, How I am going to integrate React component link or url into Aurelia application?

Please let me know if you have any doubts in question. I can do explain in detail.

Thanks in advance. Harish

1 Answers
Related