These are chat archives for SmartFocus/reactjs

27th
Feb 2015
Juho Vepsäläinen
@bebraw
Feb 27 2015 06:02
http://projects.formidablelabs.com/radium/ - inline style thinger. it seems to be more advanced than earlier solutions
Juho Vepsäläinen
@bebraw
Feb 27 2015 09:41
i'm having some strange problems with travis and jest bebraw/reactabular#12 . two different projects, similar error (test fails). curiously when running locally, no problems
Juho Vepsäläinen
@bebraw
Feb 27 2015 09:49
got it. if you have require('react') and then require('react/addons') in your tests, it will use two different versions of React
i wish TestUtils was a standalone...
hmm. what if i do both requires and extract TestUtils from latter... gotta try
Juho Vepsäläinen
@bebraw
Feb 27 2015 09:55
yeah. that's the ticket. for reference if you want to use require('react') at your lib and TestUtils at tests, you can something like this at tests:
var React = require('react');
var TestUtils = require('react/addons').addons.TestUtils;
Firtina Ozbalikci
@toxicFork
Feb 27 2015 15:21
hmmmm, i'd rather var React = require("react/addons"); var TestUtils = React.addons.TestUtils;
Juho Vepsäläinen
@bebraw
Feb 27 2015 15:29
@toxicFork the problem is that on lib side i don't need addons
@toxicFork that solutions would force me to do that
Firtina Ozbalikci
@toxicFork
Feb 27 2015 15:30
ah i see...
Juho Vepsäläinen
@bebraw
Feb 27 2015 15:30
if you need addons on lib side, then it's fine of course
Firtina Ozbalikci
@toxicFork
Feb 27 2015 15:30
how much heavier is it
Juho Vepsäläinen
@bebraw
Feb 27 2015 15:30
not sure. if it doesn't make any great difference, maybe addons could be used anyway
for me it would be nicer if they would just get rid of addons and publish separate packages for those
but i guess they have their reasons
Firtina Ozbalikci
@toxicFork
Feb 27 2015 15:32
well i thought if the addons "require"d react then it wouldn't load two different things
Juho Vepsäläinen
@bebraw
Feb 27 2015 15:32
yeah. anyway, it's good to be aware of that gotcha with jest
another thing - use peerDeps for React, not regular