These are chat archives for reactioncommerce/reaction

9th
Jun 2017
Clive Makamara
@cmosh
Jun 09 2017 03:59
Hi there, I'm not sure why but with the latest docker rel
*release all users are guest, and can't change their usernames
DamianPereira
@DamianPereira
Jun 09 2017 07:49
Hi, what is the cheapest possible hosting that can run reaction commerce?
It seems aws t2.small can go as low as 17usd a month, for 1 instance, but do I need another one for mongoDB?
Is there any way to get it running on a server for less than 10usd a month? Maybe some other cloud hosting provider or a VPS?
Tiago Marques
@tapmarques_twitter
Jun 09 2017 08:46
Hi! I have a question, when using Reaction can I interact with the server from an Android Native App?
Brent Hoover
@zenweasel
Jun 09 2017 08:47
What would you mean by “interact”?
Tiago Marques
@tapmarques_twitter
Jun 09 2017 08:48
Lets say I host a React framework, can I develop an Android App to see products, buy, etc.?
By the way, thank you for your answer!
Brent Hoover
@zenweasel
Jun 09 2017 08:49
You could using DDP, or you could create REST endpoints
Tiago Marques
@tapmarques_twitter
Jun 09 2017 08:50
Yes, but do you have some plugin to enable that or do I have to code it entirely myself?
*enable it
Brent Hoover
@zenweasel
Jun 09 2017 08:51
We don’t have an Android SDK
You would need to code it yourself.
Tiago Marques
@tapmarques_twitter
Jun 09 2017 08:52
Ok, thank you.
Tiago Marques
@tapmarques_twitter
Jun 09 2017 08:53
Thanks! Keep up with the good work!
Brent Hoover
@zenweasel
Jun 09 2017 08:54
:+1:
silverjeong
@silverjeong
Jun 09 2017 09:03
hi. I have a question. i already installed Meteor. but when I run reaction 'reaction run', this text 'Oops! You don't have Meteor installed yet!' comes out. why is this text message coming up?
Brent Hoover
@zenweasel
Jun 09 2017 09:43
What happens if you just type meteor at the command line?
Sean
@JungleCatSW
Jun 09 2017 10:23
does the concept of a workflow exist outside of reaction ? Could do with finding some docs explaining it ?
Brent Hoover
@zenweasel
Jun 09 2017 10:29
It’s a concept I have heard pretty much my entire professional life. https://en.wikipedia.org/wiki/Workflow
It’s not something I have really studied per-se. Just sort of term that gets used.
Loan Laux
@loanlaux
Jun 09 2017 10:32
Hey guys! Is there a time at page load when MongoDB collections are not accessible?
Is there any callback I can used on Template to put my data fetching code in?
Brent Hoover
@zenweasel
Jun 09 2017 10:33
You will want to use ready() and wrap it in an autorun block
Loan Laux
@loanlaux
Jun 09 2017 10:34
Tracker.autorun()?
Brent Hoover
@zenweasel
Jun 09 2017 10:34
Right
Loan Laux
@loanlaux
Jun 09 2017 10:35
Perfect, thanks, I'll try that out. :) Was trying to get it working with Template.templateName.onCreated() but no success
Brent Hoover
@zenweasel
Jun 09 2017 10:35
If you look for Tracker.autorun you should be able to find a lot of examples
something like this
Template.something.onCreated(function () {  
  this.totalOrders = new ReactiveVar(0);
  this.orders = this.subscribe("Orders");
});

Template.something.onRendered(function () {  
  // Do reactive stuff when subscribe is ready
  this.autorun(function () {
    if (this.orders.ready()) {
        const totalOrders = Orders.find({}).count();
        this.totalOrders.set(totalOrders);
      }
  });
});
Loan Laux
@loanlaux
Jun 09 2017 10:37
Is there any specificity I should be aware of about "feeding" data to a React component when mounting it using react-remplate-helper?
Brent Hoover
@zenweasel
Jun 09 2017 10:38
Just that you will want to use a container. Container for data, compoment for presentation
the heart of a data container would look like this:
function composer(props, onData) {
  const countries = Countries.find({}).fetch();

  const productHandle = Reaction.Router.getParam("handle");
  if (!productHandle) {
    Reaction.clearActionView();
  }

  Meteor.subscribe("TaxCodes");

  onData(null, {
    countries,
    variant: props.variant,
    editFocus: Reaction.state.get("edit/focus")
  });
}

VariantFormContainer.propTypes = {
  variant: PropTypes.object
};

export default composeWithTracker(composer)(VariantFormContainer);
Loan Laux
@loanlaux
Jun 09 2017 10:41
Okay, thanks a lot @zenweasel, I think I got it :)
Brent Hoover
@zenweasel
Jun 09 2017 10:42
:+1:
Sean
@JungleCatSW
Jun 09 2017 12:20
@zenweasel re the workflow thing, im looking at the code for a workflow method, and is it right to say that most of the logic for plugins is held in work flows ? they are like the controller in MVC? or like a service ?
I m trying to get my head round plugins..
Christopher Whiteford
@cswhiteford
Jun 09 2017 16:28
Anyone have experience pulling typekit in?
Joshua Austill
@jlaustill
Jun 09 2017 16:34
Hello, can anyone give me a url for a site actually using reaction?
Mike Murray
@mikemurray
Jun 09 2017 18:39
Joshua Austill
@jlaustill
Jun 09 2017 18:40
@mikemurray Does it always load this slow?
Mike Murray
@mikemurray
Jun 09 2017 18:40
It’s all in how you set it up, and how selective you are in what data you want loaded initially
Joshua Austill
@jlaustill
Jun 09 2017 18:42
this artlimes.com just took over 30 seconds to render the ui for me
it loaded in 5 seconds, then spun for around 25
juandanceswild
@juandanceswild
Jun 09 2017 18:43
yeah that site is ridic slow… i don’t know if there are other stores in production with reaction but this probably shouldn’t be the one to show as a sample...
Aaron Judd
@aaronjudd
Jun 09 2017 18:43
Dynamic module loading is coming in the next couple of Reaction releases.. Meteor 1.5 has been released with support for this and we're beginning to implement this now.
The production bundle is currently 5MB -> so by loads slow -> it's really just the time to load this bundle (once for the entire application). Should be able to get in the 1-2MB range pretty easily now, over the next few releases.
Also.. no idea about the hosting, custom code, images, etc that any site uses of course
Joshua Austill
@jlaustill
Jun 09 2017 18:43
oh wow that's nuts. our magento bundle is only 1.2mb and it's INSANE
Aaron Judd
@aaronjudd
Jun 09 2017 18:44
Ah yes but….
1MB of that is transliteration.. so if you aren’t internationalized...
you don’t need that
Joshua Austill
@jlaustill
Jun 09 2017 18:44
actually in our case 1mb of it is stupid zendesk :(
Aaron Judd
@aaronjudd
Jun 09 2017 18:44
so that’s a perfect example of where dynamic modules are going to resolve this
so you are saying that magento is just .2. mb? are you including the admin and every single page that gets loaded for the every route?
Joshua Austill
@jlaustill
Jun 09 2017 18:45
Our intranet(which I wrote from scratch) is a mongodb, node.js, knockout.js, express site, and I have it's bundle down to around 800kb using require.js
Aaron Judd
@aaronjudd
Jun 09 2017 18:45
because remember.. right now, there is no additional network traffic or downloads after the initial load
I’m pretty sure we’ll get to around the same size bundle.. (~1-2 mb)
also note that SSR is coming (weeks not months)
Joshua Austill
@jlaustill
Jun 09 2017 18:46
ssr?
I'm new here :)
Aaron Judd
@aaronjudd
Jun 09 2017 18:47
Server side rendering -> so then you download a static page that is already pre-rendered (you know, like PHP)… then the dynamic portions/modules will load after that
Joshua Austill
@jlaustill
Jun 09 2017 18:48
oh nice, that's something much easier done with react than with knockout :)
Aaron Judd
@aaronjudd
Jun 09 2017 18:48
it’s in progress: reactioncommerce/reaction#2406
Joshua Austill
@jlaustill
Jun 09 2017 18:49
I'm going to have to download this and play with it this weekend. We are in the process of deciding what to replace Magento with. You aren't currently on our list, but you are using my preferred stack so i want to at least check it out
Aaron Judd
@aaronjudd
Jun 09 2017 18:50
now that we have dynamic module loading, we can start being more selective about what/when/where things are loaded.. our actual client (as in user facing) code is more like 200k
Joshua Austill
@jlaustill
Jun 09 2017 18:51
which module loading library are you using?
Joshua Austill
@jlaustill
Jun 09 2017 18:52
awesome, something else to read into this weekend :)
Joshua Austill
@jlaustill
Jun 09 2017 18:53
my experience is mainly with angular and knockout, so I'm not familiar with react or meteor at all
this example is typescript, is reaction written in typescript?
Aaron Judd
@aaronjudd
Jun 09 2017 18:54
ES6
Joshua Austill
@jlaustill
Jun 09 2017 18:55
awesome, i HATE ts
lol
Aaron Judd
@aaronjudd
Jun 09 2017 18:55
in a far away galaxy… we started with CoffeeScript -> learned our lesson, try to stay vanilla now
Joshua Austill
@jlaustill
Jun 09 2017 18:55
I learned that lesson the hard way myself
I've been doing the es6 thing in node lately though and I'm having a mostly positive experience with it.
Aaron Judd
@aaronjudd
Jun 09 2017 19:02
:thumbsup: all about the imports
Daniel Honig
@dhonig
Jun 09 2017 19:02
vanilla FTW
Aaron Judd
@aaronjudd
Jun 09 2017 19:05
most everything I liked about Coffeescript is in ES6 I doubt I’d use anything else if I were starting something new now..
Aaron Judd
@aaronjudd
Jun 09 2017 19:11
actually the Meteor 1.5 release post is probably a better spot to get up to speed on the dynamic modules: https://blog.meteor.com/announcing-meteor-1-5-b82be66571bb
tdmoneybanks
@tdmoneybanks
Jun 09 2017 22:05
watch the video regarding them
great video that explains the concept and shows the speed gains explicitly
video on @aaronjudd link:)