These are chat archives for FreeCodeCamp/Help

29th
Oct 2018
kinopotato
@kinopotato
Oct 29 2018 01:49
hello, quick question. Is there anything wrong with this?

const circle {
radius: 1,
location: {
x: 1,
y: 1
},
draw: function() {
console.log("draw");
}
};

circle.draw();

I'm getting a bunch of weird errors in vs code, I rarely use VS code because I'm still a beginner and use online JS stuff most of the time, but I can't run this and for the life of me I don't know what's wrong
I just tried it with repl.it, I still get errors. this looks normal to me O.O
Oh, I needed an "=" weird.
sorry, I'm new to oop
you know what, that question was just stupid, how could I forget to use = when declaring variables.
Christopher McCormack
@cmccormack
Oct 29 2018 01:55
haha no worries
Kranti Nebhwani
@darkphotonKN
Oct 29 2018 03:04
are there any reasons to NOT use create-react-app to create the app start and environment to make a production website? Ive used it for all my apps and I can't think of why you wouldn't but im asking in case
when making a react app of course
Claudio Restifo
@Marmiz
Oct 29 2018 03:09

the only two args I've heard for are:

1- the bundle size is too big if I don't need all that functionality.

2- if you want some custom tweak you need to eject. If you know it in advance it's probably easier to start from scratch with your own config that change an existing one

but
I'm very much in favour of CRA @darkphotonKN
Kranti Nebhwani
@darkphotonKN
Oct 29 2018 03:20
@Marmiz sounds good, i think ill stick with it xD. what about styling, is there any "best practice"? For example I found you can easily ignore the fact that the entire thing is made in react and when styling just simply do your normal css or sass thing to style the RESULT of the html markup generated by react, and hence you could also just use bootstrap classes inside the jsx too. Or is it necessary to use stuff like reactstrap antdesign etc where you use entire components that are styled by them?
Claudio Restifo
@Marmiz
Oct 29 2018 03:44

@darkphotonKN It's totally up to you. You can use a library specifically made for react. You can write your own S/CSS and pretty much have it modular already (since you include it piece by piece in each component), you can ignore this and write it as a separate file, then use normal class html attribute.

One library I fell in love with for styling react is styled-components

Eric Miller
@ericmiller777
Oct 29 2018 05:27
oh what
I thought this gitter was gone
Kranti Nebhwani
@darkphotonKN
Oct 29 2018 05:33
@Marmiz oh man thats an amazing set of styles ive been missing out on. what about grids
what do you use for grid structure if your using styled-components
Aditya
@ezioda004
Oct 29 2018 05:37
@ericmiller777 Gone? Why?
@Marmiz You use styled components for CSS? I use CSS modules, just like to keep CSS separated.
Eric Miller
@ericmiller777
Oct 29 2018 05:38
I did a chingu project around the time the new certs came out, when i came back my old link gave a 404, and there were no links to the gitter in fcc anymore
Aditya
@ezioda004
Oct 29 2018 05:39
Ah, you mean the main room? That was deleted but other rooms have stayed intact.
Eric Miller
@ericmiller777
Oct 29 2018 05:39
I see I didnt know
Why did they remove all the links?
Aditya
@ezioda004
Oct 29 2018 05:40
Which links?
Eric Miller
@ericmiller777
Oct 29 2018 05:40
also some ppl I can bother to look at my portfolio site, I know it needs more projects, but how does it look?
the links to this chat when you click for help in fcc
Claudio Restifo
@Marmiz
Oct 29 2018 05:41

the links to this chat when you click for help in fcc

I think they want to focus on the form... but don't quote me

Eric Miller
@ericmiller777
Oct 29 2018 05:41
@Marmiz I met Quincy at a meetup, he pretty much said that, so I thought they just got rid of this channel too
Claudio Restifo
@Marmiz
Oct 29 2018 05:42
@ezioda004 depend on the project actually.
One is made with a mix of styled components and some UI library.
Others with pure SCSS.
Manish Giri
@Manish-Giri
Oct 29 2018 05:44
Any react experts here
Claudio Restifo
@Marmiz
Oct 29 2018 05:44
@darkphotonKN if you can use it, flexbox is pretty easy to create grid systems
#grammar
Eric Miller
@ericmiller777
Oct 29 2018 05:44
@Manish-Giri in no way an expert, what do you need though?
@darkphotonKN if you dont know flex then id recommends flexbox zombies by dave geddes
Claudio Restifo
@Marmiz
Oct 29 2018 05:45
what i meant was: a grid system is pretty simple to make with flexbox. Otherwise there are some libraries that offer modular CSS, so you can plug in only grids instead of all the rest of CSS to reduce boilerplate
@darkphotonKN
Eric Miller
@ericmiller777
Oct 29 2018 05:45
or just go master grid up to you :)
Manish Giri
@Manish-Giri
Oct 29 2018 05:45

@ericmiller777 @Marmiz

In the past, a frequent solution was to use either a wrapping div or span element, which was not elegant as it would increase the size of DOM tree and the reason being JSX

which was not elegant as it would increase the size of DOM tree and the reason being JSX
is this part true?
Claudio Restifo
@Marmiz
Oct 29 2018 05:46
<> is the new random div
yep
you had to create lots of random divs around with jsx
because of limitation with the API
you never saw the error:
"React.CreateElement require a top level div (wrapper) ....bla...bla"
@Manish-Giri
Manish Giri
@Manish-Giri
Oct 29 2018 05:47
@Marmiz i did but i didn't know it was considered 'bad'
Eric Miller
@ericmiller777
Oct 29 2018 05:47
no one uses createElement :P
Claudio Restifo
@Marmiz
Oct 29 2018 05:47
They introduced React.Framgment since react 16
@ericmiller777 that's what JSX uses
Manish Giri
@Manish-Giri
Oct 29 2018 05:48

what about

and the reason being JSX

does that sound a bit unclear
Eric Miller
@ericmiller777
Oct 29 2018 05:48
yes?
Aditya
@ezioda004
Oct 29 2018 05:53
The reason I'd say is not fully accurate. JSX desugars to React.createElement() which needs to have a root element.
Claudio Restifo
@Marmiz
Oct 29 2018 05:53
@Manish-Giri I think that's because JSX uses react.CreateElement under the hood.
So without a wrapper would knows not type
React.createElement(
  type,
  [props],
  [...children]
)
render() {
 <A />
<B />
<C />
}
Once passed to createElement what's the type?
that's why you needed a wrapper
Eric Miller
@ericmiller777
Oct 29 2018 05:55
@ezioda004 ah okay yes it does need a root element (usually a div)
Claudio Restifo
@Marmiz
Oct 29 2018 05:55
render() {
<div>
 <A />
<B />
<C />
</div>
}

React.createElement(
  div,
  [props],
  [...children] // A, B, C
)
Eric Miller
@ericmiller777
Oct 29 2018 05:55
So it technically is still wrapped in a div
Claudio Restifo
@Marmiz
Oct 29 2018 05:55
@ericmiller777 nope since v 16
you can pass a fragment
and avoid extra markup
Aditya
@ezioda004
Oct 29 2018 05:55

The type argument can be either a tag name string (such as 'div' or 'span'), a React component type (a class or a function), or a React fragment type.

The type can also accept fragment.

Eric Miller
@ericmiller777
Oct 29 2018 05:55
@Marmiz when did this happen?
Claudio Restifo
@Marmiz
Oct 29 2018 05:56
version 16.0
Aditya
@ezioda004
Oct 29 2018 05:56
@Marmiz Did you read about React Hooks?
Eric Miller
@ericmiller777
Oct 29 2018 05:56
I noticed create-react-app v2 also supports scss natively
/sass
Claudio Restifo
@Marmiz
Oct 29 2018 05:57
yeh, saw the tweet yesterday. @ezioda004
gonna wait till is implemented before trying it
Aditya
@ezioda004
Oct 29 2018 05:57
The syntax feels weird to me.
And so does the reasoning behind introducing.
Claudio Restifo
@Marmiz
Oct 29 2018 06:00

well

a typical React application in React DevTools, you will likely find a “wrapper hell” of components surrounded by layers of providers, consumers, higher-order components, render props, and other abstractions.

is super true

so the "components become a mess of lifecycles and states changes"
Aditya
@ezioda004
Oct 29 2018 06:03
Ok I agree to that - but I dont use React dev tools because I barely get use of it, normally console.log() does all the debugging trick I need.
Claudio Restifo
@Marmiz
Oct 29 2018 06:04
it's not for the dev tools. Is the fact that once you have a massive monster of component, refactor it means changing a LOT of things
Aditya
@ezioda004
Oct 29 2018 06:04

In our observation, classes are the biggest barrier to learning React. You have to understand how this works in JavaScript, which is very different from how it works in most languages.

In every language you have to learn a concept thats a bit hard. Dont see why JS is any different.

@Marmiz We have composition to resolve that - this is a design issue IMO
Claudio Restifo
@Marmiz
Oct 29 2018 06:10

this is a design issue IMO

how familiar are you with the concept of good code™?
xkcd

Manish Giri
@Manish-Giri
Oct 29 2018 06:11
@Marmiz what are the other significant changes in v16
fragments, context api and
Claudio Restifo
@Marmiz
Oct 29 2018 06:12
@Manish-Giri quite a few actually. I thought there was a blog post
but it's pretty much that I think
(well context is actually a bigger deal, means almost no more need for redux)
Aditya
@ezioda004
Oct 29 2018 06:12
New lifecycle methods
Old ones getting deprecated
Claudio Restifo
@Marmiz
Oct 29 2018 06:13
oh yeah, right. The derivedStateFromProps
Manish Giri
@Manish-Giri
Oct 29 2018 06:13
ugh
Aditya
@ezioda004
Oct 29 2018 06:13
@Marmiz :spaghetti: code the best code
Manish Giri
@Manish-Giri
Oct 29 2018 06:14
will it ever happen that i go to sleep one night and by next morning some JS thing hasn't changed completely
Claudio Restifo
@Marmiz
Oct 29 2018 06:15

@Manish-Giri actually with the introduction they explained why.
Makes sense.
Here's a good blog post

https://reactjs.org/blog/2018/06/07/you-probably-dont-need-derived-state.html

Aditya
@ezioda004
Oct 29 2018 06:16

Its not JS tho, its React. Their philosophy is

“learn once, write anywhere.”

Should be more like:

"learn once, learn it again before writing"

Eric Miller
@ericmiller777
Oct 29 2018 06:18
hey guys
I was going through the javascript curiculum again
I know I hae the code right
someone else mind testing it?
Aditya
@ezioda004
Oct 29 2018 06:21
Whats your code?
Eric Miller
@ericmiller777
Oct 29 2018 06:21
how do i link code in here again?
Aditya
@ezioda004
Oct 29 2018 06:22
Paste it?
Press ctrl + shift + m for formatting help
Manish Giri
@Manish-Giri
Oct 29 2018 06:23
on another note
do any of you want to pair up for algorithm practice
Eric Miller
@ericmiller777
Oct 29 2018 06:24
switch(val){
    case 1:
    case 2:
    case 3:
      answer = "low";
      break;

    case 4:
    case 5:
    case 6:
      answer = "medium";
      break;

    case 7:
    case 8:
    case 9:
      answer = "high";
      break;
  }
I can log both val and answer
Aditya
@ezioda004
Oct 29 2018 06:25
@ericmiller777 "low" -> "Low"
Eric Miller
@ericmiller777
Oct 29 2018 06:25
.>
....
Aditya
@ezioda004
Oct 29 2018 06:25
case sensitivity matters
Eric Miller
@ericmiller777
Oct 29 2018 06:25
lol
I was about to go try and debug it in the repo, time for bed
Kranti Nebhwani
@darkphotonKN
Oct 29 2018 07:09
@Marmiz thats a good idea, i like to use bootstrap grid and i think ill try styled components. How do you only plug in the grid portion of bootstrap tho, I see only ommiting / including css and js parts of bootstrap but not individual features
Claudio Restifo
@Marmiz
Oct 29 2018 07:23
@Manish-Giri I'm doing some exercise in Golang.
we can share resources if you want to practice a bit. PM if you want
@darkphotonKN oh I don't know about bootstrap. But it's not the only css library that offers a grid system. (was thinking of Bulma or Burbon, that are modular)
But if you like bootstrap I think you can download the source code, and include locally only the bits you need
Kranti Nebhwani
@darkphotonKN
Oct 29 2018 07:25
@Marmiz thats a good idea, ill try it out. thanks bud
Manish Giri
@Manish-Giri
Oct 29 2018 07:31
@Marmiz man when did you learn go
here i'm having a hard time keeping up with java + js
Claudio Restifo
@Marmiz
Oct 29 2018 07:33
@Manish-Giri infact I don't know go.
I'm just practicing it to become familiar with syntax and stuff.
I still have to do some actual projects with it :smile:
Manish Giri
@Manish-Giri
Oct 29 2018 07:36
Any good resources for a beginner?
@Marmiz
Claudio Restifo
@Marmiz
Oct 29 2018 07:38
@Manish-Giri I'm using the official doc. Tour of Go :)
Kranti Nebhwani
@darkphotonKN
Oct 29 2018 08:00
@ezioda004 hey man do you remember a while back when I couldn't load out an image in a react app and we checked all th sources and file structure and paths and they were all correct and no matter what we do the image didn't load until i figured something out - do you remember what the solution was? Cuz it's happening again xD
Aditya
@ezioda004
Oct 29 2018 08:12
@darkphotonKN You used require() I think because webpack restricts importing resources from outside of /src folder.
abraham anak agung
@padunk
Oct 29 2018 08:31
@Marmiz i learn Golang too, still confused with concurrency and the concept of interfaces.
btw i make a simple div here, but somehow can set the width to 50%, there is a gap between div. Where this gap come from ?
https://codepen.io/padunk/pen/pxdJQN?editors=0100
@ezioda004 Hooks pretty awesome for what i know. No more classes... :smile:
Niraj Nandish
@Nirajn2311
Oct 29 2018 08:34
@padunk you mean the gap btw konten1 and konten2
Or the gap to the right of konten2
abraham anak agung
@padunk
Oct 29 2018 08:34
@Nirajn2311 konten1 and 2.
if i set it to 50% width, konten 2 will collapse into the third row.
I'm suck with CSS :smile:
Aditya
@ezioda004
Oct 29 2018 08:37
@padunk I dont mind classes though I will try hooks when its fully released, what bothers me is that React ecosystem changes frequently. I mean new additions are welcome but core should be intact.
Claudio Restifo
@Marmiz
Oct 29 2018 08:38
@padunk ain't the gap due to the width being 49% so there's a 1% gap between them
abraham anak agung
@padunk
Oct 29 2018 08:39
@ezioda004 yes, i changes fast from what i know a year a go.
@Marmiz yes, but if i change it to 50%, it won't fit the second row. the konten2 will make new row.
Claudio Restifo
@Marmiz
Oct 29 2018 08:40
@padunk that's because they have a block display
abraham anak agung
@padunk
Oct 29 2018 08:43
@Marmiz so i can't get rid of it? i mean in dev tools it showing nothing for margin even the display is block
Ene Catalin
@EneCatalin
Oct 29 2018 08:44
guys I need some general help
I have an interview in javascript, which is nice and all that, but I haven't written js in about a year
anyway, what's the modern way to connect to an API in js ?
Aditya
@ezioda004
Oct 29 2018 08:46
@padunk Any reason to not use flexbox?
Henry
@GitHub-Henry
Oct 29 2018 08:46
@EneCatalin i like fetch
Ene Catalin
@EneCatalin
Oct 29 2018 08:46
is that a library ?
abraham anak agung
@padunk
Oct 29 2018 08:46
@ezioda004 yes i think either flex or grid is on the way...
Ene Catalin
@EneCatalin
Oct 29 2018 08:47
sorry just woke up and am trying to gather materials for study
Claudio Restifo
@Marmiz
Oct 29 2018 08:47
@padunk actually is the fixed width, on container that is causing issue as well
Aditya
@ezioda004
Oct 29 2018 08:48
@padunk +1 for flex :D
Ene Catalin
@EneCatalin
Oct 29 2018 08:48
wait
is fetch a library ?
(for web connections I mean)
Aditya
@ezioda004
Oct 29 2018 08:49
@EneCatalin Its a web API provided by browsers.
Claudio Restifo
@Marmiz
Oct 29 2018 08:52
@padunk I mean, you can achieve that if you put the text into a secondary container, set the border-box (just for consistency) and make container occupy all its content.
Ene Catalin
@EneCatalin
Oct 29 2018 08:52
thanks guys
so that's pretty much the modern way of fetching stuff
Claudio Restifo
@Marmiz
Oct 29 2018 08:52
but a different display on container (like flexbox / grid) will make everything easier
Manish Giri
@Manish-Giri
Oct 29 2018 08:54
@EneCatalin :wave:
Ene Catalin
@EneCatalin
Oct 29 2018 08:54
hey
Manish Giri
@Manish-Giri
Oct 29 2018 08:55
how's android going
Claudio Restifo
@Marmiz
Oct 29 2018 08:55

I have an interview in javascript

a good luck wish is mandatory :sparkles:

Manish Giri
@Manish-Giri
Oct 29 2018 08:56
ooh all the best ostrich
abraham anak agung
@padunk
Oct 29 2018 08:56

@Marmiz you know what, found it on SO, we just need to write it like

<div>....</div><div>....</div>

No new line and whitespace... hahahaa... i mean wtf..... but Thank you anyway.
Any good resource with Golang? Please PM me :smile:

Ene Catalin
@EneCatalin
Oct 29 2018 08:56
@Manish-Giri phone fell, gave up
just want a job
Manish Giri
@Manish-Giri
Oct 29 2018 08:56
lol
Ene Catalin
@EneCatalin
Oct 29 2018 08:56
MUCH fewer jobs on android than js
and the stomach is starting to say its word
Manish Giri
@Manish-Giri
Oct 29 2018 08:57
what about spring
Ene Catalin
@EneCatalin
Oct 29 2018 08:57
there's jobs in it
but I suck at it beyond belief
Manish Giri
@Manish-Giri
Oct 29 2018 08:57
lol
i'm starting hibernate soon
Ene Catalin
@EneCatalin
Oct 29 2018 08:57
I also get the impression they are NOT newbie friendly
Manish Giri
@Manish-Giri
Oct 29 2018 08:57
:gun:
even angular isn't
Ene Catalin
@EneCatalin
Oct 29 2018 08:58
no, I mean spring is not newbie friendly
it's complex af
how's your study of it going ?
Manish Giri
@Manish-Giri
Oct 29 2018 08:58
yea that's what i meant about angular too
Ene Catalin
@EneCatalin
Oct 29 2018 08:58
not going to do angular I think ? Probs react
Manish Giri
@Manish-Giri
Oct 29 2018 08:58
its all right, not as bad
Ene Catalin
@EneCatalin
Oct 29 2018 08:59
but yeah, I'd legit love to do android again
but I'd need a new phone/pc
Manish Giri
@Manish-Giri
Oct 29 2018 08:59
emulator
Ene Catalin
@EneCatalin
Oct 29 2018 08:59
and, you know, a job first
I don't have my pc at the dorm
so not really
Manish Giri
@Manish-Giri
Oct 29 2018 08:59
okay
Ene Catalin
@EneCatalin
Oct 29 2018 08:59
but anyway, as said, LOTS more jobs for newbies in js for some reason
can't believe I actually got called for an interview
I suck lolk
Manish Giri
@Manish-Giri
Oct 29 2018 09:00
lol
Ene Catalin
@EneCatalin
Oct 29 2018 09:00
ima get crushed
Henry
@GitHub-Henry
Oct 29 2018 09:02
@EneCatalin luck favors the prepared mind, good luck
i heard a stat ,currently there are about 1,000, 000 unfilled job openings. that means the us and other economies have been humming along
Ene Catalin
@EneCatalin
Oct 29 2018 09:05
yes, it's my only hope of not starving by waiting for a job as a programmer
(or be forced to get a job as anything else)
one of the few moments of clarity ostrich has had over the years
Henry
@GitHub-Henry
Oct 29 2018 09:08
a friend of mine just got his dream job, testing and designing games. it also didn't hurt that he was also titled as the worlds fastest speed runners for his favorite game, so dreams do come true.
this for a guy who got a degree in music, and later decided games was more his thing.
Ene Catalin
@EneCatalin
Oct 29 2018 09:10
ostrich is just good at getting lost
like, in general
ohhhhhhhh
that's nice
speed running games is hard as hell
Henry
@GitHub-Henry
Oct 29 2018 09:11
yeah
Ene Catalin
@EneCatalin
Oct 29 2018 09:11
games in general are actual hard work
doing them in the fastest time possible ? Kill me
Henry
@GitHub-Henry
Oct 29 2018 09:12
he was finding bugs the designers of the game didn't even know existed
that got the attention of the game makers
he'd go to conferences and show them their game flaws
kinopotato
@kinopotato
Oct 29 2018 09:12

Hello, sorry to butt in, but I was hoping someone could either explain why this code works or point me in the right resource?
let ownProps = [];
let prototypeProps = [];

for (let property in duck) {
if(duck.hasOwnProperty(property)) {
ownProps.push(property);
} else {
prototypeProps.push(property);
}
}
I'm not used to for in statements. what is the value of the variable "property" that if it is inside .hasOwnProperty() of the object "duck" that it returns true (I'm guessing) and that false when it comes to prototype properties which in this case is pushed to another array.

Henry
@GitHub-Henry
Oct 29 2018 09:15
@kinopotato http://pythontutor.com/javascript.html#mode=edit use this the analyze each line of your code
it will visualize each step of your code
Aditya
@ezioda004
Oct 29 2018 09:16
@kinopotato Does duck's prototype have properties?
.hasOwnProperty() only checks if the property exists in the same object, in operator also checks in the prototype chain.
kinopotato
@kinopotato
Oct 29 2018 09:17
@GitHub-Henry I'm checking this out, this looks legit and will take some time to digest
@ezioda004
function duck(name, color){
this.name = name;
this.color = color;
}
duck.prototype.numLegs = 2;
Aditya
@ezioda004
Oct 29 2018 09:18
const x = {a: 2};
const y = Object.create(x);
y.hasOwnProperty("a"); //false
"a" in y; // true
@kinopotato Ok so numLegs is a prototype property which doesnt exist in the instance object itself but rather on the prototype chain.
name and color are instance properties.
kinopotato
@kinopotato
Oct 29 2018 09:20
yes, but why does this work? xD because in the code, if(duck.hasOwnProperty(x) returns true I guess and is pushed, but what is x?
Aditya
@ezioda004
Oct 29 2018 09:21
x is just a string/property name.
const obj = {a: 1, b: 2};
for (let prop in obj){
  console.log(prop); // "a", "b"
}
kinopotato
@kinopotato
Oct 29 2018 09:23
so it works like a stand in? Like it will return true for every property inside the object?
Aditya
@ezioda004
Oct 29 2018 09:24
You mean .hasOwnProperty()?
kinopotato
@kinopotato
Oct 29 2018 09:25
no, prop
basically any variable before in
Aditya
@ezioda004
Oct 29 2018 09:26
Well, in operator as I've said looks for enumerable* properties in object itself as well as prototype chain.
prop is just a variable, it's assigned a different value each iteration.
Kinda like a for..of loop.
kinopotato
@kinopotato
Oct 29 2018 09:27
ahhh, so it changes each time it loops. so if I were to console.log(prop), it would match the properties in an object?
Aditya
@ezioda004
Oct 29 2018 09:28
Correct.
kinopotato
@kinopotato
Oct 29 2018 09:28
it is also why it returns true with .hasOwnProperty; because it becomes that property
and it's a nifty way to iterate without errors and shit,
ohhhhhh
Aditya
@ezioda004
Oct 29 2018 09:28
Its a declarative way of looping.
kinopotato
@kinopotato
Oct 29 2018 09:29
welp, I'll tackle whatever declarative looping is next time. there's a limit to how much brain cells I can burn in a day xD
Aditya
@ezioda004
Oct 29 2018 09:29
Hah, its a lot to digest.
kinopotato
@kinopotato
Oct 29 2018 09:30
thanks for the info :D
Aditya
@ezioda004
Oct 29 2018 09:30
No problem.
Henry
@GitHub-Henry
Oct 29 2018 09:44
@ezioda004 nice job with patience, explanation of JS concepts, and quickly addressing the issue in question. :+1:
teacher level skills
Aditya
@ezioda004
Oct 29 2018 09:48
@GitHub-Henry I try, thanks!
kinopotato
@kinopotato
Oct 29 2018 10:04

Hello, just a very quick question with JS oop terms
function Bird(name) {
this.name = name;
}

let duck = new Bird("Donald");
in this case, Bird is the constructor while duck is the instance/object of Bird correct?

Kranti Nebhwani
@darkphotonKN
Oct 29 2018 10:08
@darkphotonKN
any ideas on how to show my loading page for a few seconds and then remove it completely when that loading page is a html page and not a div? It's because i write that loading page in react and the rest of my project will be in react, that loading welcome animation is done with greensock timeline max which cannot be used in react for some reason...it works perfectly outside of react
so basically i want to show a html page that shows my loading animations for a few seconds, then the rest of my site that is a react app
Aditya
@ezioda004
Oct 29 2018 10:12
@kinopotato Thats correct.
kinopotato
@kinopotato
Oct 29 2018 10:13
@ezioda004 thanks again! just wanted to make sure since the terms seems to change sometimes (like how properties are called elements in other places)
Aditya
@ezioda004
Oct 29 2018 10:14
@kinopotato Elements? Thats a first. In OOP terms - properties are synonymous with attributes/fields, never heard of elements tho and no problem.
abraham anak agung
@padunk
Oct 29 2018 10:15
@darkphotonKN everything in React is component. You can put your loading page as a component and show it while your page is loading.
kinopotato
@kinopotato
Oct 29 2018 10:33

hello, it's me again, just wondering why I need "" for this when I'm referencing a property and not a string
let Dog = function(name, color){
this.name = name;
this.color = color;
}

Dog.prototype = {
numLegs: 4,
breed: "doggo"
}

let myNewDoggo = new Dog("paris hilton", "shiny");

Dog.prototype.hasOwnProperty("numLegs");
so if I use numLegs instead of "numLegs" it is showing undefined if I remember correctly. But numLegs is a property or a key I think and not a string

Aditya
@ezioda004
Oct 29 2018 10:39
@kinopotato Use numLegs where? In any case properties are stored as string.
If you use bracket notation [ ]then [numLegs] would be interpreted as a variable so that will resolve in different value (whatever is stored in it).
kinopotato
@kinopotato
Oct 29 2018 10:42
ahhhh, so properties are stored as strings yet they can act as variables since they have values and their values can be changed. I guess if I do this long enough this won't be confusing anymore, lol
Mohammed Boudad
@matrixersp
Oct 29 2018 11:05
Can someone tell me the difference between @babel/core and babel-core?
Alex
@Wulfheart
Oct 29 2018 12:11
Hello, anyone out there?
BuntyBru
@BuntyBru
Oct 29 2018 12:20

Hi guys,
You must have heard about alerts in bootstrap, i want the same thing with less width in order to put out options

<div class="alert alert-success alert-dismissible">
                                              <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
                                              <strong>Success!</strong> 
                                            </div>

i am calling an API which will produce a lot of options and i want the options in the same format as the success word here, just with less width and cross button is mandatory
Any way through which I cana achieve it

BuntyBru
@BuntyBru
Oct 29 2018 12:32
bootstrap tags input
that is the thing
Owais Ali
@ows-ali
Oct 29 2018 12:42
can anybody give me a favor by reading my article before i can publish it on Github? It is about push, commit and pull basic commands of Git. Please give me your email so i can send you
it is my first article
typo: before i can publish it on Medium.com
Momozor
@momozor
Oct 29 2018 12:44
I want to read the article
Owais Ali
@ows-ali
Oct 29 2018 12:45
@faraco great! please give me your email address
Momozor
@momozor
Oct 29 2018 13:33
is gitter website actually an SPA app?
Anand Potukuchi
@anandpotukchi
Oct 29 2018 17:05
do i install webpack-cli globally?
Christopher McCormack
@cmccormack
Oct 29 2018 17:08
@anandpotukchi up to you, but I normally install it as a devDependency I believe
depends on how you're using it
May Kittens Devour Your Soul
@diomed
Oct 29 2018 18:42
is my life actually a SPA
Christopher McCormack
@cmccormack
Oct 29 2018 19:50
@diomed Are you trying to say spaghetti?
Barbara Pentoney
@flyfishingbarbara
Oct 29 2018 20:51
hi peeps- would love some help to figure out how i can get my left-side nav to go up to the top of page when responsive....like in the example tech documentation page...
this one is the example https://codepen.io/freeCodeCamp/full/NdrKKL
this one is mine re sass...https://codepen.io/flyfishingbarbara/pen/MPovZJ?editors=0100
thanks!
Momozor
@momozor
Oct 29 2018 21:49
:cat2:
Tommy Bogdanovich
@Tommyisr
Oct 29 2018 22:56
Hello! Can anyone help me with "onclick"?
I dont understand why my function isn't called https://codepen.io/tommy-bogdanovich/pen/xyevdj
Jason Luboff
@JLuboff
Oct 29 2018 22:58
@Tommyisr Change your function name
Victor Popescu
@VicPopescu
Oct 29 2018 22:59
@Tommyisr as @JLuboff said, try to avoid using reserved names
Tommy Bogdanovich
@Tommyisr
Oct 29 2018 23:00
It works, thank you :)
Barbara Pentoney
@flyfishingbarbara
Oct 29 2018 23:03
@Tommyisr that's cute!