Closed Genaker closed 5 years ago
I think you are mistaken. The React source does not run in the browser directly (because that would fail in 100% of the browsers) but is transpiled to ES6, ES5 and then AMD code. The AMD transpiled code simply loads React
and ReactDOM
via RequireJS so that is loaded only once. We are not using Webpack - see in the instructions instead.
Do you have live web site? I would like to check it
On Sat, Jun 15, 2019 at 12:09 AM Jisse Reitsma notifications@github.com wrote:
Closed #3 https://github.com/yireo-training/Yireo_ReactMinicart/issues/3 .
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/yireo-training/Yireo_ReactMinicart/issues/3?email_source=notifications&email_token=ACGJNZX34ETA6UVZXUFSYI3P2SIRHA5CNFSM4HYNXF52YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOR73CMOY#event-2415273531, or mute the thread https://github.com/notifications/unsubscribe-auth/ACGJNZTEGM2HDFEHDGUL3ALP2SIRHANCNFSM4HYNXF5Q .
There is no live site. This is not a commercial project, this is simply open source. If you are a Magento developer that wants to see if this React source works for you, simply follow the instructions to set things up and see for yourself. I'm not sure why you opened up this ticket, but simply by looking at the source code, you have made an assumption that is wrong. So if you want to provide some feedback that is valid, please take the extra mile and install the extension.
I consider this ticket closed and see no sense in discussing things further. If you believe there is an issue, please provide a demo yourself and show me the results of some kind of loading results. If you are new to React, make sure to follow the steps. If you are looking for a React-based menu, without the intention of modifying the source code, stop right there - it doesn't make sense, because this is a developer project, not a ready-made project that claims to offer a minicart that is better than the original.
I didn't have the opportunity to a check live application but I can see that you include React Components twice per module. First time with Require JS with module Yireo_React and second in the application itself using webpack build, it will compile all dependencies including react js into one file and you will have two duplicates of react libraries. import React, { Component } from 'react'; If you will have 10 React components modules for Magento you will include REact 11 times. You should exclude React from import (import React from 'react') and build and react from require Magento JS or use the react library from web pack build in Magento