These are chat archives for reactioncommerce/reaction

29th
Mar 2018
Amalan Jenicious
@amalan-shenll
Mar 29 2018 06:08
what is the alternative for this
return FS.Utility.eachFile(event, (file) => {
const fileObj = new FS.File(file);
fileObj.metadata = {
type: "banners",
ownerId: userId,
shopId
};
in reaction 1.10.0
Brent Hoover
@zenweasel
Mar 29 2018 06:12
Are you trying to load images from disk?
Amalan Jenicious
@amalan-shenll
Mar 29 2018 06:13
yes
its image upload process
Brent Hoover
@zenweasel
Mar 29 2018 06:14
The swag shop repo has been updated to work with 1.10, and it has an example of loading images from Disk
Amalan Jenicious
@amalan-shenll
Mar 29 2018 06:15
thanks, i will check that
Brent Hoover
@zenweasel
Mar 29 2018 06:15
:+1:
afour-deepakn
@afour-deepakn
Mar 29 2018 07:02
@zenweasel
We are going to build ecommerce website like amazon where core modules will be Admin,Seller,And Buyer
does Reaction has supporting all submodules for these or need a customization for the same
?
Brent Hoover
@zenweasel
Mar 29 2018 07:05
Right now our marketplace implementation is pretty basic as it allows for a “primary” store and then shops underneath that. Products can be created in either the primary or any of the secondary shops and you can checkout out with items from both primary and secondary and it will split that order up between the shops (with some limitations)
Unlikely it’s going to meet all your needs out of the box, but it might give you a head start
afour-deepakn
@afour-deepakn
Mar 29 2018 07:06
Ok,Thank you so much
Brent Hoover
@zenweasel
Mar 29 2018 07:07
:+1:
ushadev
@ushadev
Mar 29 2018 08:06
image.png
If we have products more them 24. the first 24 are getting loaded( in the productContainerCustomer page ) and when we scroll down to the bottom of the page we don't find the LoadMoreProducts button and a client console error occurs saying loadProducts is not a function. actually, it is getting undefined and the next 24 products are not being loaded. above is the screenshot of the client console error.
image.png
Brent Hoover
@zenweasel
Mar 29 2018 08:10
Yeah, I saw the issue. Haven’t had time to take a look at it yet
ushadev
@ushadev
Mar 29 2018 08:13
Thanks for having a look. will wait
erdemilhan
@erdemilhan
Mar 29 2018 09:36
@zenweasel we are trying out the order process as a customer, however on our local installation we could not see how to cancel an order as a customer (not shop owner) in a marketplace setting
is this intentional ?
njbotkin
@njbotkin
Mar 29 2018 11:32
I made this plugin to hold me over until better SSR support lands in Reaction: https://github.com/njbotkin/reaction-ssr-preview
It renders a preview of a page with prerender, caches it, and shows it to the client while the bundle is loading/initializing.
Patrick Newell
@pnewell4_twitter
Mar 29 2018 13:59
@njbotkin++!
looking forward to checking it out
William Moss
@willmoss1000
Mar 29 2018 14:05
I would like to replace the HOCs with my own HOCs. Doing the following seems to wrap the existing HOCs in my own replaceComponent("ProductsCustomer", ProductGrid, [ composeWithTracker(composer) ]);
how would i go about replacing the HOCs?
Is that possible @prinzdezibel
Michael Jenny
@prinzdezibel
Mar 29 2018 16:11

@willmoss1000 something along the lines:

const hocs = getHOCs("ProductsCustomer")
hocs[0] = myHoc;
replaceComponent("ProductsCustomer", MyComponent)

This would alter the first HOC of the component as well as the component itself

Your code snippet would add a new HOC to the existing ones
Michael Jenny
@prinzdezibel
Mar 29 2018 16:19
@ushadev verified that this is a bug. We'll prioritize it and then somebody will fix it
(PR's are also welcome)
Loan Laux
@loanlaux
Mar 29 2018 16:44
@prinzdezibel @willmoss1000 In such cases, I usually use registerComponent. Would you guys consider this as bad practice?
Michael Jenny
@prinzdezibel
Mar 29 2018 16:59
@loanlaux no, I wouldn't. Perhaps that's even the cleaner approach.
Marc Schipperheyn
@mschipperheyn
Mar 29 2018 18:48
Reaction is very slow to startup (takes about 5 mins) and process changes. I see the node process at 110-124% a lot of the time. How can I diagnose what is causing this?
Running on a 2014 MBP
njbotkin
@njbotkin
Mar 29 2018 18:49
There are some env vars you can set that give you some metrics. https://github.com/meteor/meteor/blob/devel/tools/PERFORMANCE.md
Marc Schipperheyn
@mschipperheyn
Mar 29 2018 18:53
thx
William Moss
@willmoss1000
Mar 29 2018 21:48
@loanlaux @prinzdezibel thanks both! If I register component can I keep the component name the same (and it will choose my component), or is that bad practise somehow?
@zenweasel in the product schema, what is "originCountry" referring to? The country in which the item was produced, or the country where it now is?
Brent Hoover
@zenweasel
Mar 29 2018 21:51
@willmoss1000 The country where it was created/manufactured. For customs
Loan Laux
@loanlaux
Mar 29 2018 21:53
@willmoss1000 When I said I use registerComponent, I was implying I was keeping the same name to effectively replace it in the component "registry" or whatever you want to call it. Essentially using it as replaceComponent, but passing your own HOCs to it.
William Moss
@willmoss1000
Mar 29 2018 21:54
great! thanks. That's how I'm using it. Just wanted to be careful
@loanlaux great! That's easiest, i'll just change them from replaceComponent to registerComponent!
Loan Laux
@loanlaux
Mar 29 2018 21:55
Would be cool to have a replaceComponentWithHOCs method or something along those lines. It would basically be an alias for registerComponent but would clear things up a little on this topic.
William Moss
@willmoss1000
Mar 29 2018 21:56
yes, I certainly found it all pretty confusing. it's pretty easy when you understand, but I remember coming at it all a month ago and without looking at examples from the swag-shop I would've had no idea
Marc Schipperheyn
@mschipperheyn
Mar 29 2018 22:27
@loanlaux throwing iron at a poor build system is a poor and expensive fix imho. I have the basic reaction installation running and trying to get one small test plugin to work. Every save costs minutes to process with the processor at 120% for the node process. Memory is nowhere near maxed out. There's gotta be a better way? I develop large react projects with effortless reloads with proper webpack config. Is this normal?