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
Stephen James
@sjames1958gm
@etcIgor which text are you trying to center?
Igor Pugach
@etcIgor
that is under the image...
Emil
@aguyinmontreal
@kartikv20 no, I'm good with Express/NodeJs/Jquery / however React is new to me
Kartik V
@zephy20
for API, jQuery is outdated
use fetch
it has a relatively simple format
Sweet Coding :)
@SweetCodingInc
@kartikv20 whoaaa????
since when XMLHttpRequest become outdated?
Emil
@aguyinmontreal
@sjames1958gm thanks, I heard that when using React, we had to avoid mix it with Jquery at all cost, what's your stand on that? What else do you suggest for APIs?
CamperBot
@camperbot
aguyinmontreal sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8935 | @sjames1958gm |http://www.freecodecamp.org/sjames1958gm
Aditya
@ezioda004
@etcIgor Since that p has col-md-8 col-md-offset-2 try
p {
   text-align: right;
}
Jonathan Cunanan
@jcunanan05
@aguyinmontreal axios is good too
Stephen James
@sjames1958gm
@aguyinmontreal I don't agree with avoid at all cost type statements. You use the tools that are appropriate.
I would look to solving the problem with native tools such as fetch API before going to use jquery.
Certainly a lot of jquery is HTML formatting which would not be useful when you are using React for that.
Igor Pugach
@etcIgor
but in the original version css is not used at all (
Kartik V
@zephy20
@SweetCodingInc well not outdated, but more people are shifting to fetch
Aditya
@ezioda004
@etcIgor Ok without CSS then add class = "text-right" on that p
Igor Pugach
@etcIgor
didn't help, will experiment further, thanks
Aditya
@ezioda004
Sure, its a bootstrap class and works fine when I tested on your pen.
Emil
@aguyinmontreal
@sjames1958gm so for example, on Gitlab, when people are adding comments on an open "issue", and I see the new comments appearing live on my screen, that's necessarily websockets? It cannot be done with API requests?
Pieter Stokkink
@forkerino
@aguyinmontreal you can use API calls for it, but then you need to poll the server manually every x amount of time
Stephen James
@sjames1958gm
@aguyinmontreal Well you can periodically request updates, but that can put an extra load on the server depending on the number of clients
Emil
@aguyinmontreal
@forkerino @sjames1958gm alright! so web sockets is 100% the way to go? any other technology that can be used for that?
Pieter Stokkink
@forkerino
@aguyinmontreal I'd use the socket, I don't know of any good alternative (the API calls can work for moderate amount of users, for example an app that is only available for a limited number of users, but it doesn't scale well)
Stephen James
@sjames1958gm
@aguyinmontreal Of course the backend will have to support web sockets, if not then polling will have to be used
Sweet Coding :)
@SweetCodingInc
@aguyinmontreal STOMP is a well standardized technology. You could combine that with either socket api or SSE (server sent events)
Emil
@aguyinmontreal
@sjames1958gm what exactly do you mean by "polling", could you please provide me with a link? thanks
CamperBot
@camperbot
aguyinmontreal sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
api offline
Emil
@aguyinmontreal
@SweetCodingInc do you have a link for some suggestions on how to integrate STOMP ?
Sweet Coding :)
@SweetCodingInc
the server?
@aguyinmontreal what's your backend?
node/java/.net
Emil
@aguyinmontreal
@SweetCodingInc NodeJS/Express
Stephen James
@sjames1958gm
@aguyinmontreal polling just means to perriodically request information from the backend
Emil
@aguyinmontreal
@sjames1958gm alright! :)
Sweet Coding :)
@SweetCodingInc
@aguyinmontreal
webstomp
stompit
Emil
@aguyinmontreal
@SweetCodingInc and on the React side?
Sweet Coding :)
@SweetCodingInc
I've used stompit extensively
React is client.. and for that you'll use stomp js
there is react-stomp
Emil
@aguyinmontreal
Pieter Stokkink
@forkerino
@aguyinmontreal check https://socket.io/
very easy to incorporate in a Node backend
Sweet Coding :)
@SweetCodingInc
@aguyinmontreal that's why i shared webstomp and stompit..
they're for backend
@forkerino checkout ExpressIO A neat and clean wrapper around express + socket.io
Pieter Stokkink
@forkerino
@SweetCodingInc :smile:
Emil
@aguyinmontreal
@forkerino socket.io is based on web sockets, or something else?
Sweet Coding :)
@SweetCodingInc
@aguyinmontreal websockets