These are chat archives for reactioncommerce/reaction

12th
May 2018
Loan Laux
@loanlaux
May 12 2018 08:31
@dancastellon I believe you should do something like const myPackage = import("path/to/package");
AlCon1989
@AlCon1989
May 12 2018 10:18
Hello,
Does anyone have any working online project don with reaction ?
I would very much like to migrate a project over to reaction.
Jakub Gadawski
@JacobGadawski
May 12 2018 11:18
Screenshot from 2018-05-12 13-18-11.png
Hi, I can't save changes in my shop in edit mode because of error: 'Promise.await is not a function'. I was searching a hours to find solution but nothing help. Do anyone know how resolve that ?
Loan Laux
@loanlaux
May 12 2018 11:20
@JacobGadawski I've seen this error before but not sure what causes it
@AlCon1989 Have you checked the showcase page on Reaction's website?
Jakub Gadawski
@JacobGadawski
May 12 2018 11:37
@loanlaux this is strange error because I just create new reaction project and nothing change in code yet ...
Loan Laux
@loanlaux
May 12 2018 11:37
I agree @JacobGadawski, that's a weird one
mikepuglisi
@mikepuglisi
May 12 2018 11:39
@JacobGadawski I have the same problem. I commented on it here reactioncommerce/reaction#4202
Fresh linux....installed just for reaction commerce after I gave up on windows.
Jakub Gadawski
@JacobGadawski
May 12 2018 11:49
@mikepuglisi Same here, I have Linux Mint and maybe this is main case of that problem. Thanks for link to the issue. I must to comment that too.
Loan Laux
@loanlaux
May 12 2018 13:46
@JacobGadawski @mikepuglisi Just reproduced this error when editing shop settings. I'll +1 the issue on GitHub.
Dan Castellon
@dancastellon
May 12 2018 14:06
@zenweasel & @loanlaux thanks for following up. I've seen some of the dynamic imports throughout the app. They make sense. But see this React component in my custom plugin. I'm importing react-summernote dynamically, but for some reason it's still included in the Meteor client bundle. When I do the same thing in an empty Meteor app, react-summernote is not included in the client bundle: https://github.com/dancastellon/reaction-plugin-dynamic-import/blob/master/imports/plugins/custom/imports-test/imports/ui/components/ContentEditor.js
Loan Laux
@loanlaux
May 12 2018 14:09
Sorry @dancastellon but I don't know what's going on there... Hope you find out soon.
Dan Castellon
@dancastellon
May 12 2018 14:10
Hey no worries. I just thought I'd call it out. I already posted an issue on RC's Github w/ 2 example repos :)
Jussi Vesa
@jussivesa
May 12 2018 17:20
This is bit confusing for me - why there is private/data json's containing data, when this should be stored in the database ? For example, in the Swag shop demo, what if there is already Shops or Products in db, whats the point of the json's ?
Loan Laux
@loanlaux
May 12 2018 17:22
These are fixtures, @jussivesa. They're imported on startup if the corresponding collection is empty. That's basically where you'll put your fake products for local development.
Jussi Vesa
@jussivesa
May 12 2018 17:23
Hm, that seems logical. Well, I did not include these fixtures in my project and I'm using SKIP_FIXTURES flag, but at least the Swag shop requires these, else it contains tons of errors.
Loan Laux
@loanlaux
May 12 2018 17:23
Rest assured, they aren't used as long as you have products/shop settings etc already in place. If you want to see/edit the actual data past the first startup, connect to Mongo with mongo --port 3001 while Reaction is running.
Thank for reporting! I'm not sure the Swag shop has yet been updated for Reaction 1.11. Would need someone else to confirm though.
Jussi Vesa
@jussivesa
May 12 2018 17:25
And yes, only my products are shown, but some of the custom components are programmed in a way where they "expect" the fixtures are in the project. But thanks again Loan!
Loan Laux
@loanlaux
May 12 2018 17:26
Oh, are they? I must admit I haven't spent much time reading the swag shop repo... What parts of it referes to these files?
Jussi Vesa
@jussivesa
May 12 2018 17:27
Hmm it seems like it, or the React props atleast do. For example at the TagNav, and the "hero" component's do so.
Loan Laux
@loanlaux
May 12 2018 17:28
Can you provide me with a GitHub link to the line you're reffering to? Would very much like to take a look
Jussi Vesa
@jussivesa
May 12 2018 17:29
I haven't spend much time either on the Swag shop but I though to get quick idea of custom footer etc, but it seems to be easier to do it from the scratch
Now excuse me, I will have to take a break, You can message me at the private chats if you would like to do so! :)
Loan Laux
@loanlaux
May 12 2018 17:32
I'm pretty certain that this isn't referring the fixture files, but rather the data coming from MongoDB that is passed down the component tree.
As you can see, the data that's injected from there is fetched from MiniMongo after subscribing to the Products/grid and ProductGridMedia publications.
Jussi Vesa
@jussivesa
May 12 2018 17:54
Ah, well then my data isin't loading fast enough since the prop is empty and giving me an error. I will have to take a look at that, not sure whats causing it.
Loan Laux
@loanlaux
May 12 2018 17:57
That's much more likely to be the problem. You might want to file a bug report if you think this is a bug in Reaction and/or the swag shop plugin.
Although I repeast, I believe the swag shop repo isn't yet compatible with 1.11 so you need to run it on 1.10
Jussi Vesa
@jussivesa
May 12 2018 18:27
Yep, I need to test more to make sure. How does Reaction decide to trigger the container and the methods in the container? When component in container is rendered I guess? Im on 1.10 I believe
Loan Laux
@loanlaux
May 12 2018 19:09
You might want to read more about Meteor trackers and how they work with React
That's actually a core part of Reaction's front-end, since almost all data comes from a reactive source