These are chat archives for jdubray/sam

12th
Sep 2017
Fred Daoud
@foxdonut
Sep 12 2017 00:15

@jdubray you do not need to add those two script tags. You should remove them.
Instead, you need to add this line at the top of your files that use JSX:

import React from 'react';

This is because the compiler translates JSX to code that uses React and so it needs to be imported.

Michael Terry
@formido
Sep 12 2017 02:08

@foxdonut

@jannesiera from the description I don't have much to go on. It might look something like this:

update(model => {
  model.errorMessage = "...";
  return model;
});
firebaseInstance.signout();
Probably something along these lines would work. The issue for me is that my model is in a react component and I'm updating it with setState. Since logging out of firebase is async, and I need to make changes to the model based on the firebase logout callback, I first needed to update the error message in the react component, wait for that render, and then tell firebase to logout so I can wait for the callback. So, there's a next automatic action after handling the action of storing an error message. The error message is then shown to the user AFTER the firebase logout callback fires, whereupon the login view is displayed and the error message gives them a hint.
Fred Daoud
@foxdonut
Sep 12 2017 10:31
@formido right, if you need to do something after waiting for async firebase logout, you could call update(..) in the callback.
Jean-Jacques Dubray
@jdubray
Sep 12 2017 13:57
@foxdonut I see in the jsx file, they need to be there are well, otherwise they are not visible (not just once in app.jsx)
Fred Daoud
@foxdonut
Sep 12 2017 13:58
@jdubray yes that's what I said, hope it's working for you now.
Jean-Jacques Dubray
@jdubray
Sep 12 2017 14:02
will try, thanks.
Marcus Feitoza
@mfeitoza
Sep 12 2017 14:04
@jdubray Rollup and Buble are much more easy to make things works... instead of Webpack and Babel
devin ivy
@devinivy
Sep 12 2017 14:18
i still like browserify :D
but i use webpack most of the time. rollup i wouldn't use for an app, but would for a lib.
Marcus Feitoza
@mfeitoza
Sep 12 2017 14:23
@devinivy I use Rollup for app and works fine.
Fred Daoud
@foxdonut
Sep 12 2017 14:57
I've no problems with webpack and babel.
The BEST build tool is the one that makes YOU most productive! :)
Jean-Jacques Dubray
@jdubray
Sep 12 2017 15:32
@foxdonut that didn't work, not sure why, I'll just stick to my includes. Not a big deal. I'll fix it later looking at a create-react-app project.
Janne Siera
@jannesiera
Sep 12 2017 15:47
@devinivy what is rollup exactly and why is it suited for a lib but less for an app?
devin ivy
@devinivy
Sep 12 2017 15:50
in actuality you can use rollup just fine for an app. as far as i know, however, it does not support code splitting, loading static assets like css/scss/images, or have hot reloading.
on the flip side, it is very light and does not add much boilerplate code when building.
so it is well-suited to distributing js libs written in "modern" javascript.
there's this article which i think goes into more detail https://medium.com/webpack/webpack-and-rollup-the-same-but-different-a41ad427058c
Janne Siera
@jannesiera
Sep 12 2017 16:10
I can't wait for full ES6 Modules support
I find bundling hard to debug
also full ES6 support would be nice. I enjoy writing ES6 (even more than I expected) but writing in ES6 and debugging in transpliled ES5 is a bit odd.
Jean-Jacques Dubray
@jdubray
Sep 12 2017 16:24

I find bundling hard to debug

that's an understatement

devin ivy
@devinivy
Sep 12 2017 17:25

hey @foxdonut and @jdubray i think pull streams might be a cool, minimal way to implement a reactive loop for SAM/meiosis. might try it– if i do i will share.

https://github.com/pull-stream/pull-stream

Fred Daoud
@foxdonut
Sep 12 2017 18:41
@devinivy too much API for my taste, but if you give it a go, please do share :thumbsup: