These are chat archives for reactioncommerce/reaction

13th
Mar 2017
Patrick Artounian
@partounian
Mar 13 2017 00:52
I haven't looked into the details of reaction's docker setup, but @mateomorrison if you invest a little time into Docker you can easily create a setup with a shared volume which that whatever you edit in that folder (your plugins, core reaction code, whatever you set it to be) will change in the Docker and in change show up on your screen.
But Docker will guaranteed slow down your workflow making any changes or development. You will have some kind of error at some pooint.
Patrick Artounian
@partounian
Mar 13 2017 01:36
Talking about the really high CPU usage, that is an issue on production too right?
Brent Hoover
@zenweasel
Mar 13 2017 01:37
No, it shouldn’t be
Patrick Artounian
@partounian
Mar 13 2017 01:41

Running "reaction" should be production right? Only "reaction run" is dev? For me anything besides meteor --release 1.4.1.2 spikes the CPU.

Edit: I'll just stop mentioning it here, because I have come to realize it's probably completely Meteor's issue.

Brent Hoover
@zenweasel
Mar 13 2017 01:44
reaction === reaction run
You would be running a built app in production. So you are no longer running “Meteor” you are running a Node app.
Patrick Artounian
@partounian
Mar 13 2017 03:30
Oh, then what's the point of reaction run? Thank you again for your support overall.
Brent Hoover
@zenweasel
Mar 13 2017 03:48
reaction run is the real command, reaction is just a shortcut
Jinpeng LV
@gepolv
Mar 13 2017 03:55
Hi Guys, Just found a weird issue. I put it on Forum: https://forums.reactioncommerce.com/t/create-your-plugin-bug/305
Brent Hoover
@zenweasel
Mar 13 2017 03:59
@gepolv What is exactly is the problem you are having?
You are not going to find Blaze templates in the Templates collection, that’s not how that works
Jinpeng LV
@gepolv
Mar 13 2017 05:52
@zenweasel In the customization example, this file: reaction/imports/plugins/custom/reaction-example-plugin/client/templates/layouts/core.html contains a line "<div class="bkdebug"><em>layoutFooter template:</em> {{layoutFooter}}</div>", but in the home page, {{layoutFooter}} displays nothing.
It is suppose to display "layoutFooter", right?
Brent Hoover
@zenweasel
Mar 13 2017 06:00
If there is an existing template with the name passed into the layoutFooter variable
Line 26: layoutFooter: "layoutFooter",
Brent Hoover
@zenweasel
Mar 13 2017 06:04
yes, so here is the template called layoutFooter
<template name="layoutFooter">
  <nav class="navbar-bottom" role="navigation">
    <div class="row">

    </div>
  </nav>
</template>
Jinpeng LV
@gepolv
Mar 13 2017 06:06
So, it should display "layoutFooter". But it actually displays:Bee's Knees layout layoutHeader template: layoutHeader layoutFooter template: Main Template: products
Brent Hoover
@zenweasel
Mar 13 2017 06:06
pardon?
Jinpeng LV
@gepolv
Mar 13 2017 06:07
For this line: "<div class="bkdebug"><em>layoutFooter template:</em> {{layoutFooter}}</div>",
it should display: layoutFooter template: layoutFooter
Correct?
Brent Hoover
@zenweasel
Mar 13 2017 06:07
Yes, which you can see above, is empty
Jinpeng LV
@gepolv
Mar 13 2017 06:07
Why is it empty?
OK
I got your point.
Brent Hoover
@zenweasel
Mar 13 2017 06:08
because it’s just for demonstration purposes, You are supposed to put your own stuff in there
Jinpeng LV
@gepolv
Mar 13 2017 06:09
OK. Then why this line: "<div class="bkdebug"><em>layoutHeader template:</em> {{layoutHeader}}</div>" can correctly display?
Brent Hoover
@zenweasel
Mar 13 2017 06:10
Ok, I think you are getting what is just a debug line mixed up with render actual templates
Just putting {{layoutHeader}} will render the name of the template, not an actual template
Jinpeng LV
@gepolv
Mar 13 2017 06:11
so again, why is {{layoutFooter}} empty?
it is supposed to display the name of the template.
Brent Hoover
@zenweasel
Mar 13 2017 06:12
Yeah, I see what you are saying.
Jinpeng LV
@gepolv
Mar 13 2017 06:13
Great!
Could you help?
I was digging into the source code for a while and still could not figure out why.
Brent Hoover
@zenweasel
Mar 13 2017 06:13
Yeah, give me a few minutes though
Jinpeng LV
@gepolv
Mar 13 2017 06:14
Thanks.
Jinpeng LV
@gepolv
Mar 13 2017 06:46
Take your time. I need take a break now.
Anh Le (Andy)
@anhldbk
Mar 13 2017 14:38

Hi guys! I'm reading the guide about customizing Reaction Commerce. It states that:

What do I need to know to create a plugin?

The concepts in this tutorial are mostly Reaction-specific and don’t get into some of the more difficult-to-grasp (but cool) elements of Meteor such as pub/sub or reactivity. But to understand what is happening you should probably have the following:

- A basic understanding of Javascript
- A basic understanding of HTML
- Either some experience using a template engine like Handlebars, Django Templates or ERB or have read the Blaze documentation

So can I use React to write plugins?

Jeremy Shimko
@jshimko
Mar 13 2017 15:00
yes
Anh Le (Andy)
@anhldbk
Mar 13 2017 16:36
@jshimko Thank you! I think it's a little bit awkward to use ReactJS and spacebars templating simultaneously. The approach of Telescopejs (using only React) is clearer, right?
Jinpeng LV
@gepolv
Mar 13 2017 16:45
@anhldbk I believe that is a legacy issue. Reaction used BLADE first and then moved to React.
@zenweasel Hi Brent, did you have a chance to figure out why {{layoutFooter}} is empty?
Anh Le (Andy)
@anhldbk
Mar 13 2017 16:54
@gepolv Oh, so please tell me if the guide is up to date? Where can I find the react-based guide?
Brent Hoover
@zenweasel
Mar 13 2017 19:44
@gepolv Yes, the issue is this: reactioncommerce/reaction#1969
@anhldbk You can use mostly React but there are still Blaze elements in the app.
There currently is no React-based guide