Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 17:13
    @mstellaluna banned @cmal
  • Jan 08 22:05
    @mstellaluna banned @dertiuss323
  • Nov 07 2018 04:42
    User @texas2010 unbanned @ows-ali
  • Nov 02 2018 16:25
    @texas2010 banned @ows-ali
  • Oct 12 2018 05:50
    @bjorno43 banned @NACH74
  • Oct 05 2018 23:02
    @mstellaluna banned @JomoPipi
  • Sep 16 2018 12:21
    @bjorno43 banned @yash-kedia
  • Sep 16 2018 12:16
    @bjorno43 banned @vnikifirov
  • Sep 05 2018 08:12
    User @bjorno43 unbanned @androuino
  • Sep 05 2018 07:38
    @bjorno43 banned @androuino
  • Aug 23 2018 16:57
    User @bjorno43 unbanned @rahuldkjain
  • Aug 23 2018 16:23
    @bjorno43 banned @rahuldkjain
  • Jul 29 2018 14:13
    User @bjorno43 unbanned @jkyereh
  • Jul 29 2018 01:00
    @bjorno43 banned @jkyereh
  • Jul 10 2018 22:09
    @bjorno43 banned @manafn
  • Jul 06 2018 15:20
    @texas2010 banned @imlegend19
  • Jul 03 2018 12:28
    @bjorno43 banned @vbvmatta
  • Jun 29 2018 13:54
    @bjorno43 banned @OGTechnoBoy
Christopher McCormack
@cmccormack
hmm scratch that, I guess you can do it either way
if you nest it like that you don't need the for attribute however
Gianpaolo
@gianpaolodatu
I'm following the example from the Basic HTML lessons...
What is the other way?
Christopher McCormack
@cmccormack
<label for="not-sure">Not sure</label>
<input id="not-sure" type="radio" name="recommend">
Gianpaolo
@gianpaolodatu
Got it, thanks
Christopher McCormack
@cmccormack
I believe for allows you to click the text to select the input
but if you wrap it you don't need it
newmoon
@newmoon
It's valid either way - pros and cons to each approach
Christopher McCormack
@cmccormack
This probably wont resolve your issue, just noticed it
newmoon
@newmoon
If you want the label somewhere else on the page, don't wrap it around the input. Otherwise, it's perfectly valid.
Christopher McCormack
@cmccormack
@newmoon yeah I did correct myself above
newmoon
@newmoon
Yep, clarifying for @gianpaolodatu not you @cmccormack :p
Christopher McCormack
@cmccormack
I always thought it was weird having a text and an input sibling
newmoon
@newmoon
The text does feel orphaned that way
Like, I need a span around the text or something lol
Christopher McCormack
@cmccormack
right? That's what the label is for!
that's why I don't nest personally
also makes it easier to add margins/etc...
newmoon
@newmoon
I think Materialize requires it nested for their label effects, but I may be wrong. That's where I first saw it that way
No, I'm wrong. Not sure where I saw it that way.
Gianpaolo
@gianpaolodatu
Ah got it, "All your radio-buttons must have a value attribute : expected 3 to equal 0 "
that's the error
Christopher McCormack
@cmccormack
Materialize does their stuff totally different
I think the button itself is not the input, the label is, something like that
it's odd
@gianpaolodatu nice, all done now?
Gianpaolo
@gianpaolodatu
HMM, just gotta do the valid e-mail/phone number thing
Is that doable with CSS/HTML only?
Christopher McCormack
@cmccormack
yes
for the tests
normally you would want to clean it up on the backend first before adding to db though
Gianpaolo
@gianpaolodatu
I haven't done any Back-end stuff yet so maybe at a later time
Christopher McCormack
@cmccormack
Yup just tossing that out there
You can use type for some validations, pattern for more complex validations
Gianpaolo
@gianpaolodatu
Regular expressions?
Christopher McCormack
@cmccormack
yes
Gianpaolo
@gianpaolodatu
Ok, passed all the tests. Now I gotta make this form beautiful
Is using flexbox a good idea? Or should I just use plain CSS with some queries?
Christopher McCormack
@cmccormack
@gianpaolodatu I think flexbox is a fairly simple way of making much nicer layout with minimal config
you can still use queries though
Chris Tram
@ctram
Hey all, I want to use fetch() to make a request to a server; the server then responds with a 302 redirect to another path with the same origin, so no CORS. From what I've read, I would expect the browser to follow the redirect but that is not what I have been experiencing. Instead, the browser is receiving redirect and it makes a GET request to the redirect location and receives the correct response (in this case, HTML), but the browser does not update the DOM, any suggestions?
So to clarify, I suppose the browser is acting as expected, it does follow the redirect, but my problem is that the browser does NOT update the DOM with the last response it receives.
More info: If you manually navigate to the path that will respond with a redirect, the browser will follow the redirect and update the DOM as expected. The issue here is when I am trying to follow a direct via fetch(). I have a button that will trigger a fetch() upon it being clicked.
Stephen James
@sjames1958gm
@ctram What is your code doing with the fetch response? When you use fetch your code has to process the response
Chris Tram
@ctram
function redirect() {
    const headers = new Headers();
    headers.append('Accept', 'text/html');
    fetch('http://localhost:3000/say', { headers}).then(res => {
      return res.text();
    }).then(body => {
      debugger
    })
  }
@sjames1958gm
Stephen James
@sjames1958gm
The parameter to the then will contain the data from the file, if you want it to go into the DOM you will need to put it there yourself
J. Guidry
@J-Guidry

For those who know React, I have a simon game I've been making with Reactjs. I have a boolean to disable clicking when a sequence is playing but it doesn't work. I used sourcemaps and React dev tools on Chrome in my local repo to try to find the problem, but the best I could do is seeing that the boolean toggling is happening when I set breakpoints but it is not reflected in react dev tools and buttons are still clickable. Aside from that, the app works if you don't click during a sequence and you don't double click a color. I haven't done the strict button or created the win condition yet for winning 20 turns.

I have a glitch repo with the code and a gist with the steps/psueudocode. I have been working on this for a while. I appreciate any help.
https://gist.github.com/J-Guidry/55422112c2e62b0ef3b389d91b90681e
https://glitch.com/edit/#!/reactjs-simongame