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
jcunanan05 sends brownie points to @ezioda004 :sparkles: :thumbsup: :sparkles:
:cookie: 430 | @ezioda004 |http://www.freecodecamp.org/ezioda004
Aditya
@ezioda004
@jcunanan05 I mean if you remove them it wont overflow, whats your intention exactly?
Emil
@aguyinmontreal
Hi guys! Can someone suggest me good resources on how to connect a React front-end to a back-end? How to package/distribute all the files? How to connect with the APIs? Which APIs are required? How using APIs in React is different than in JQuery? How to get real-time updates from the back-end?
Thanks!
Kartik V
@zephy20
@aguyinmontreal are you totally new to js
Igor Pugach
@etcIgor
hi everyone, who can prompt how to align text to the middle with bootstrap. I can't cope in any way... https://codepen.io/etcIgor/pen/eVZRyy?editors=1000
Stephen James
@sjames1958gm
@aguyinmontreal create-react-app is designed to create a distributable package for React.
The APIs would depend on the application.
You can use JQuery to make your API calls in React, just have to put the requests in specific life cycle methods (you can also use browser fetch API)
Real time updates would generally be done with web sockets and that is not React specific
@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/