Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:33
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • May 10 09:13
    @bjorno43 banned @zhaokunhaoa
  • Apr 25 17:12
    @mstellaluna banned @cmal
  • Apr 01 18:11
    thecodingaviator labeled #31179
  • Apr 01 18:11
    thecodingaviator labeled #31179
  • Apr 01 18:09
    thecodingaviator commented #31179
  • Apr 01 18:09
    thecodingaviator labeled #31182
  • Apr 01 18:09
    thecodingaviator labeled #31182
  • Apr 01 18:07
    thecodingaviator commented #31182
  • Apr 01 18:07
    thecodingaviator labeled #31190
  • Apr 01 18:07
    thecodingaviator labeled #31190
  • Apr 01 18:07
    thecodingaviator commented #31190
  • Apr 01 18:05
    thecodingaviator commented #31157
  • Apr 01 18:04

    thecodingaviator on master

    remove A (#31157) (compare)

  • Apr 01 18:04
    thecodingaviator closed #31157
  • Apr 01 18:04
    thecodingaviator closed #33788
  • Apr 01 18:04
    thecodingaviator commented #33788
  • Apr 01 18:02
    thecodingaviator closed #31059
  • Apr 01 18:02
    thecodingaviator commented #31059
Christopher McCormack
@cmccormack
@greaneym you can just use classes
you don't have to use inline styles for everything
Margaret Greaney
@greaneym
So far I can either use style={} with jsx, or not use jsx and use className=.
Stephen James
@sjames1958gm
@greaneym store the json into your component state - then use jsx in your render() function - don't try building HTML like you are doing.
Margaret Greaney
@greaneym
I haven't found any good examples of that yet, any pointers/
Gersho
@Gersho
oh by the way i have a question about classes, i can't seem to get the difference between a constructor function and a class, so what's the deal ?
Christopher McCormack
@cmccormack
<div className='someclass'>{stuff}</div>
Stephen James
@sjames1958gm
@diomed There are libraries that let you call python from inside of say a c++ program. But, not sure that is what you are asking.
Christopher McCormack
@cmccormack
@JLuboff well some of the css loaded...
Margaret Greaney
@greaneym
@sjames1958gm , thanks I will look at how to do that. But I was kind of surprised to find you could use classNames with ReactDom.
CamperBot
@camperbot
greaneym sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8448 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Jason Luboff
@JLuboff
@cmccormack ...thats a start..
Stephen James
@sjames1958gm
@greaneym className is used inside of jsx because class is a reserved word in js
Christopher McCormack
@cmccormack
@JLuboff but only after I added this in my node config css = fs.readFileSync('portfolio.css'); andres.write(css);` later on
errors now :)
Jason Luboff
@JLuboff
huh.. wierd. I'm guessing its using vanilla node and not express? I develop with express which makes things easier but I don't know that that would affect those files
Christopher McCormack
@cmccormack
@greaneym you should try using react components and only use react dom to attach your app to the Dom
Margaret Greaney
@greaneym
@cmccormack , I've seen the example where the reactDOM is used in the index.js to render the app, and everything else is in App.js or whatever.js. So follow this example, you are saying.
Christopher McCormack
@cmccormack
I think personally it's much cleaner
Margaret Greaney
@greaneym
@cmccormack , I am a react newbie. thanks
CamperBot
@camperbot
greaneym sends brownie points to @cmccormack :sparkles: :thumbsup: :sparkles:
:star2: 1195 | @cmccormack |http://www.freecodecamp.com/cmccormack
Gersho
@Gersho

I've seen the example where the reactDOM is used in the index.js to render the app, and everything else is in App.js or whatever.js. So follow this example, you are saying.

oh, that's the part i was reading yesterday, codeacademy \o/

Christopher McCormack
@cmccormack
@greaneym here's an example I made, similar to the markdown viewer - https://codepen.io/cmccormack/pen/rwqLyr
@greaneym but if I remade it now I would probably use more functional components
Ronique Ricketts
@RoniqueRicketts
Hey guys i'm back
IMG_20170907_134246.jpg
IMG_20170907_134254.jpg
Margaret Greaney
@greaneym
is it ok to look at this? I haven't been looking at people's codepens. But I need to get clearer examples , so I will look. Hope that is all right.
Ronique Ricketts
@RoniqueRicketts
This is what outside looks like right not in Jamaica
Christopher McCormack
@cmccormack
@greaneym that's why I shared it :) it's not one of the actual FCC projects, just something I made to help me parse some documents for work
Gersho
@Gersho
@greaneym it's ok to look at everything, as long as you don't copy stuff you don't understand
Tiago Correia
@tiagocorreiaalmeida
image.png
what would be the best way to center the text with the icon right now?
Christopher McCormack
@cmccormack
@greaneym and I hate to be that guy but... their documentation is really great https://facebook.github.io/react/docs/hello-world.html
Tiago Correia
@tiagocorreiaalmeida
used display inline on the divs
Margaret Greaney
@greaneym
@cmccormack @Gersho , thanks for helping I will learn some more
CamperBot
@camperbot
greaneym sends brownie points to @cmccormack and @gersho :sparkles: :thumbsup: :sparkles:
api offline
api offline
Christopher McCormack
@cmccormack
@greaneym they use React themselves, eating their own dogfood as they say, so they're the best resource for best practices
Gersho
@Gersho
aren't they the ones who made it anyway ?
Ronique Ricketts
@RoniqueRicketts
lol api is offline unless I use it :)
Margaret Greaney
@greaneym
I am signing off now to look at more examples. thanks and bye.
Christopher McCormack
@cmccormack
@Gersho yup thus the eating their own dogfood :)
Ronique Ricketts
@RoniqueRicketts
@greaneym later Margs
Christopher McCormack
@cmccormack
@greaneym gl :thumbsup:
njordomir
@njordomir

Quick question: if I pass the following array into the function njordsFunction(args):

([1, 2, 3], [5, 2, 1, 4])

How can I reference the first and second arrays? I've been doing this for a few months now, so I feel stupid asking it, but when I do args[0] and args[1], I just get 1 and 2 the first two elements in the first array.

korzo
@korzo
@njordomir arguments[0], arguments[1]