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
CamperBot
@camperbot
:star2: 4791 | @masd925 |http://www.freecodecamp.org/masd925
api offline
:star2: 9222 | @sjames1958gm |http://www.freecodecamp.org/sjames1958gm
Jefferson
@jeffersonnnn
okay guys, i have a question. I am trying to render a call to json housed in a component onClick, but i can't seem to wrap my head around it. Here is how far i have gone in my code

import React, {Component} from 'react';
import jsonComponent from './jsonComponent';

class NewQuoteButton extends Component {
    constructor() {
        super()

        this.renderJson = thid.renderMap.bind(this);
        this.handleClick = this.handleClick.bind(this);
    }

    renderMap() {
        return (
<jsonComponent 
);
//i am trying to  call the component here. I think here is where the problem is
    }

    handleClick() {
        const newQuote = this.props.newQuote;
        newQuote();
    }

    render() {
        return (
        <div>
            <button>New Quote</button>
        </div>
        )
    }

}

export default NewQuoteButton;
Stephen James
@sjames1958gm
@jeffersonnnn Well I see one problem with thid in your constructor
@jeffersonnnn What is your jsonComponent? Is it a react component?
roxxlen
@roxxlen
maybe a typo
Moisés Man
@moigithub
where u calling renderJson ? (or renderMap) method
Jefferson
@jeffersonnnn

@sjames1958gm @moigithub @roxxlen the thisis definitely a typo, guys. i have adjusted it accordingly.

The jsonComponent is a react component where the initial fetch is made.

I am looking to house jsonComponent in renderMap , assign it to a function and then call it in the proximity of the button element.

Update, guys. I just realised that renderMap should be renderJson. @sjames1958gm @moigithub @roxxlen
Jefferson
@jeffersonnnn
Help, please?
Dhaval Vira
@dhavalveera
What help you need @jeffersonnnn
Jefferson
@jeffersonnnn
i'm looking for reliable way to make calls to json housed in another component. I'll tag you to the code right now.
Dhaval Vira
@dhavalveera
Sorry dude, I am not familiar with json
Sorry
Jefferson
@jeffersonnnn
no problem man @dhavalveera
Dhaval Vira
@dhavalveera
Sir i have to inform you otherwise you will wait for my message
kerafyrm02
@kerafyrm02
anyone need help?
Boo Far
@vapidlyrapid
hello. I'm having trouble figuring out how to draw a line for winning combos in the tictactoe project
I tried to emulate the behavior in this but without using fixed px values: https://codepen.io/alex-dixon/full/JogOpQ
coderNewby
@coderNewby
hey @darrenfj check Pm thanks
CamperBot
@camperbot
codernewby sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 2469 | @darrenfj |http://www.freecodecamp.org/darrenfj
Boo Far
@vapidlyrapid
like I can have the winning combo squares flash, but I'd really like to know how to superimpose a line through the midpoint of the set of winning squares using calc and relative values if possible
Stephen James
@sjames1958gm
@jeffersonnnn Are you including the jsonComponent in your render method of the component?
Michael Grienauer
@mgrienauer
@moT01 sorry for the super late reply, but thanks! that worked
CamperBot
@camperbot
mgrienauer sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
:star2: 1038 | @mot01 |http://www.freecodecamp.org/mot01
jollyjester
@jollyjester
Hello?
I need some help with my code
I'm trying to add a custom font but it won't work
jollyjester
@jollyjester
Here's a pic
Wait a sec
so, what's the problem?
here's the css
Tiago Correia
@tiagocorreiaalmeida
@jollyjester where's thecss and the picture?
Daniel Narilton
@spaganger
Hello. How can I have a more fine-grained control over the css font-weight property? Thanks.
Ivan Ngundela
@ingundela
Hi everyone, may you please help to fix the section “welcome” in a project that I’m working on https://ingundela.github.io/coelhoconstrucoes/
Ivan Ngundela
@ingundela
I managed to fix this issue..Thanks and happy coding mates
NickTheDesigner
@NickTheDesigner
https://codepen.io/NikitaNovikov/pen/vRPNpw anybody know why my text is floating in the middle?
the css code for the that paragraph is all the way at the bottom
hensn5250
@hensn5250
@NickTheDesigner i see it now
hensn5250
@hensn5250
without having context on what you are trying to do I can't provide much help.
Your text is floating in the middle because you set it to relative positioning and centered it with the top and left properties.
If you apply outline: 2px orange dashed to that element you can get a better view of its location relative to its parent
NickTheDesigner
@NickTheDesigner
how can I center it inside my parent
flex box?
NickTheDesigner
@NickTheDesigner
and sorry about that
Tiago Correia
@tiagocorreiaalmeida
Flexbox o
Display flex on the parent
Align items center and justifiy content center on the element, if im not mistaken
Kingsley
@Kingwindie
var table = document.createElement("table");
table.style.backgroundColor = "darkblue";
var columns = 6;

for (var i = 0; i < columns; i++) {
    /**table header */
    var tableHeader = document.createElement("th");
    tableHeader.style.width = "250px";
    tableHeader.style.height = "35px";
    tableHeader.style.lineHeight = "35px";
    tableHeader.style.borderStyle = "solid";
    tableHeader.style.borderColor = "black";
    tableHeader.style.backgroundColor = "red";
    tableHeader.style.borderWidth = "2px";
    tableHeader.style.color = "white ";
    tableHeader.style.textAlign = "center";
    tableHeader.textContent = "table header";
    table.appendChild(tableHeader);

}

for (i = 0; i < columns; i++) {

    /**table body */
    var tableBody = document.createElement("tbody");
    tableBody.style.width = "250px";
    tableBody.style.height = "350px";
    tableBody.style.lineHeight = "35px";
    tableBody.style.borderStyle = "solid";
    tableBody.style.backgroundColor = "gray";
    tableBody.style.borderWidth = "2px";
    tableBody.style.color = "white ";
    tableBody.style.textAlign = "center";
    tableBody.textContent = "images go here";
    table.appendChild(tableBody);
}

document.body.append(table);
can someone help me fix this table, i want the table body to go across the screen just like the table header