« first day (3419 days earlier)      last day (1512 days later) » 

11:00 PM
inline code
anyway yea
that
lol
 
> it don't work
yeah inline only
 
```foo
bar```
 
11:32 PM
Democratic Debate Tonight 8pm EST CBS
 
meh
 
Why do so many companies still "only" support node 8 btw? is there something special that happened between node 8 and 10?
 
yes, node 9
 
time
one common problem with node is that it releases new versions quite often compared to older languages... and typically it's not cost effective to be constantly upgrading your system to the latest and greatest, it's worse and worse the larger your team/project is.
but... if you don't upgrade, you end up in a situation where you want to use some new module, and... can't, because it doesn't support your old shit... so then you need to upgrade your old shit and find that some modules never got updated so now you need new ones, or the new ones need you to refactor your code, etc
 
Well even 3 years ago I hardly saw any company "max node version 6"; so back then almost all software I found was quite "up to date".
 
11:36 PM
basically there's advantages and disadvantages to both
We built an angular site on node 4, and didn't touch it for years
 
maybe i haven't been dev long enough but i have never had a situation where my code had to be completely refracted after an update
 
Well I understand that, but node 8 seems to be esp. a breaking point, much more than any other version (apart from 4 in the distant past).
@JBis Much to learn, you still have. Young paddewan.
 
when we did touch it, none of it worked because we didn't properly lock in the versions of modules we were using
so i had to backport modules until i found a working version, then begin the upgrade process to 8
which... wasn't bad at all
 
:]
 
it's still running on angular 1.6 iirc
and loopback2
 
11:40 PM
Well we've got our next project which will be to bring a knockout/jquery/whatever frankenstein codebase to react :P
 
why does everyone love react so much?
 
i don't think that's a true assesment
 
I think React suits a lot of use cases better than most alternatives
 
i know ssr exists for react but most apps don't use it
and i hate csr
 
Most apps don't need it
 
11:41 PM
@JBis to be honest: why would you?
 
imo it's more a case of there are only really 3 options in the node world for apps
react, angular, vue
react/angular are the more mainstream options, angular being the more... corporate one
 
with a severmap you can also direct google around, and modern day rendering is fast enough that first-meaningful-render speed isn't vital.
 
i'm using ejs for socratic answers and it isn't great but it works fine
 
isn't that just a templating engine?
 
yes
 
11:43 PM
yeah, not exactly the same kind of space that react/angular are working in
 
React feels a bit less as a vendor lock in than angular.
and our company almost died due to a vendor lock in with extjs.
 
they aren't meant for SSR, SSR is just implemented as a solution to SEO concerns.
 
@KevinB sitemaps though :P
 
@KevinB Plenty of apps that don't need super advanced dynamic front-end still use react
 
user12960916
Hey everyone, I've been reading about the filter() method in Javascript to use it for searching an array of objects I have. I've read the links shared in the chat as well as some others that I found. Everything makes sense in the ex. but none I've looked at so far use the users input. I'm currently in an intro class for C# so I tried to use what I've done is Windows Forms here. I assigned a variable the users input and then used that to filter but it's doing anything.
 
11:44 PM
plenty of apps use jquery
lol
 
user12960916
<body>
	<script>


         var people = [

    {

        name: "Sam Smith",
        age: 22,

    },

    {
        name: "Alex Smith",
        age: 12,

    },
    {

        name: "Bob Smith",
        age: 16,

    }
]
        function searchText(){
            var str=document.getElementById(input).value;
            if(str)
        }

        var text = people.filter(str);

    </script>


<input type="text" id="input" placeholder="Search">



</body>
 
CSR is always going to be much heavier
 
user12960916
Here is my code
 
If you have a hammer, it's easier to learn to hammer well than buy a screwdriver.
 
and take longer to load
 
11:45 PM
An app doesn't need to be super advanced to need React, and the difference in weight is immaterial in a lot of cases
 
@KevinB for legacy and compatibility reasons
 
var str=document.getElementById(input).value; your string is missing quotes
 
I think you should do the least amount of work on the client as possible
 
But I need to figure out how to make a dynamic loading app/not spa in react; not because I wish to do so.. But even the minimified codebase is over 2 MB in total size.
 
Why? To increase server costs? lol
Client-side work is cheaper than server-side work
 
11:46 PM
eh, i think it depends on purpose of the site.
 
So loading everything at once is giving us worse results due to slow loads.
 
Compatibility, speed, and SEO for starters
 
react/angular are teh wrong tools for the job if your ui is presenting static data.
 
so is react
use a templating engine if its static
 
well we're not talking about static stuff
 
user12960916
11:47 PM
input is not a string its the id I gave to the search box
 
we're talking about all kinds of stuff
@csscoder right, but, that method is expecting a string, and you gave it input, which is a dom element.
 
when people want to program a static site in React they'll generally use Gatsby or similar
which solves the problems you bring up
 
But anyone experience/pointers for how to split react code into "packages" that will load upon loading a (sub) page?
 
"input" will at least make that line work
the next line however is also problematic
 
@paul23 well that's what routing is all about
 
11:49 PM
Yeah but routing now just uses react-router which handles it at client side.
 
when you talk about "code splitting" that generally comes down to bundling
so Webpack or Parcel would be handling most of that
 
Server side it's just a try_files in nginx.
@forresthopkinsa not possible using cra?
 
CRA uses Webpack
at worst you'd just have to eject
 
anything you do on the front end, you have to worry about massive browser support of older browsers. So you end up loading a bunch of polyfill libs for no reason.
 
that's... not a major concern today unless you work in government
 
11:50 PM
@JBis most projects can live with 99% of users being compatible
 
and then you got mobile users who complain your site uses all the data on their plan
 
or medical
 
@JBis polyfills typically load "nothing" if you have a compatible browser
 
I mean, you have tree shaking etc to reduce bundle size
and it's normally pretty effective
 
the scripts still have to be requested
 
11:51 PM
not if they aren't needed
 
2 MB :'(
 
code splitting is very effective.
 
if you set up your bundling correctly you'll get bundle sizes down pretty low
 
@JBis yeah but if that is taking any relevant amount of your mobile limit you're indeed in the field where loading any web application is too heavy.
 
also debugging is a fuckfest (but thats probably cause i didn't install react debug tools)
 
11:52 PM
what, compared to debugging on an application server like Wildfly? I deeply disagree
 
or the sourcemap settings aren't setup right
 
That I strongly disagree with: it's actually why I would use react for even static sites. React debugging is much much easier than debugging templates.
 
right, sourcemapping makes debugging pretty straightforward
 
if you use templates properly theres no logic in the template
react also breaks the convention of separating logic and ui
 
what's up guys
 
11:54 PM
btw as for polyfills, our project uses just the static url: cdn.polyfill.io/v2/…
you'll notice there's hardly any data
On top of that, your browser might cache it.
 
user12960916
<script>


         var people = [

    {

        name: "Sam Smith",
        age: 22

    },

    {
        name: "Alex Smith",
        age: 12

    },
    {

        name: "Bob Smith",
        age: 16,

    }
]
        function searchText(){
            var str=document.getElementById("input").value;
        var text = people.filter(str);
        }

    </script> I changed the code to this now
 
i don't think we even use any polyfills
 
> react also breaks the convention of separating logic and ui
 
just avoided the things that would generally need it
 
there's some logic that belongs to the UI and IME it's easier to reason about it when they're in the same place
business logic? keep it out of your components, yeah
UI logic? JSX makes it so much easier
 
11:55 PM
like spread, and... there's an object method that ie11 doesn't support
 
JSX is cool.
 
@KevinB but clean code!
 
"clean"
 
I couldn't live with spread operators anymore lol
 
spread is a lot cleaner than its predecessors
 
11:56 PM
_ has acceptable alternatives
 
how do you deal with SEO with csr with react?
or do you not
 
csr = clientside rendering?
 
yes
 
this.setVal(oldVal => [...oldVal, ...extraData];) and the likes.
 
well I mean you'd obviously use Object.assign for that
 
11:58 PM
sitemaps should always be provided if it's a site that is intended to be found by search
but also SSR
 
its helpful for passing array as args
 
@JBis what's there to deal? - Letting the search engine "discover" other pages/links? - That's what sitemaps are for. Fast render optimization? - Not really important/ YAGNI.
 
someFunc(...someArray)
 
user12960916
I need to use an array of objects
 
> YAGNI
+1
 
11:59 PM
someFunc.apply(null,someArray)
 

« first day (3419 days earlier)      last day (1512 days later) »