Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Rubellavator
Aug 16, 2007

They still have the opportunity to call their next revision TryAngular.

Adbot
ADBOT LOVES YOU

TheCog
Jul 30, 2012

I AM ZEPA AND I CLAIM THESE LANDS BY RIGHT OF CONQUEST

Pollyanna posted:

I would not recommend using Angular these days.

Why? I use angular and its a very robust and opinionated framework that does a good job of managing the front end. With typescript, angular 4 is a pleasure to use, and it makes a lot of things that would be a pain in the rear end to do otherwise pretty doable.

Rubellavator
Aug 16, 2007

Rubellavator posted:

They still have the opportunity to call their next revision TryAngular.

TheCog posted:

angular 4

..nevermind

HaB
Jan 5, 2001

What are the odds?

Pollyanna posted:

I would not recommend using Angular these days.

Yeah, why?

It works really well for what I need it to do. They seems to have addressed most of the pain points from AngularJS without introducing too many new ones.

Pollyanna
Mar 5, 2005

Milk's on them.


I’m sure they’ll come out with Angular 5 eventually :v:

I guess I’m just an Angular racist. I used 1 a couple years back and had a bad experience, and I just like React better.

TheCog
Jul 30, 2012

I AM ZEPA AND I CLAIM THESE LANDS BY RIGHT OF CONQUEST

Pollyanna posted:

I’m sure they’ll come out with Angular 5 eventually :v:

I guess I’m just an Angular racist. I used 1 a couple years back and had a bad experience, and I just like React better.

1 was garbage. I first worked with angular 1.3 and it was a loving nightmare that I would never go back to. So yeah if that's your experience I get where you're coming from.



Fun fact, they just skipped angular 3 entirely. I have no idea why.

IAmKale
Jun 7, 2007

やらないか

Fun Shoe

Pollyanna posted:

I’m sure they’ll come out with Angular 5 eventually :v:
Angular 5 is set to release in three days, on 10/23.

Angular as a comprehensive framework is not a bad choice, especially if you're not looking to cobble together your own solution from multiple libraries.

TheCog posted:

1 was garbage. I first worked with angular 1.3 and it was a loving nightmare that I would never go back to. So yeah if that's your experience I get where you're coming from.
AngularJS 1.3 was just god-awful, I completely understand why people would have given up on the framework because of it. That said, AngularJS 1.4 and especially 1.5 did a lot of work towards simplifying 1.3's directive nightmare. I cut my SPA teeth on 1.3 a few years back, and thanks to Todd Motto's styleguide it wasn't all that bad. Jump ahead to now and I've just come off of a large 1.5 project that was a breath of fresh air. 1.5 does indeed leave you in a better position, from a higher level, to move onto Angular for newer projects - the file structure and structure of the code in general is very similar. I don't think AngularJS deserves its reputation, it's come a long way.

TheCog posted:

Fun fact, they just skipped angular 3 entirely. I have no idea why.
When Angular2 was in beta, their internal router package went through three iterations before they finally settled on a solution (I suffered through all three iterations :suicide:). "Angular 3" was skipped because, while all of the other internal packages were "v2", the router was "v3". They decided to reset versioning by calling "Angular v3" "Angular 4" so as to keep all of the internal package version numbers in sync.

lunar detritus
May 6, 2009


Angular 1.5+ (AngularJS) is really good but I wouldn't use it for a new project.

Angular (2+) is also really good but it's a monster and chances are you don't need everything it offers. It's mostly for SPAs, unlike AngularJS, Vue or React which are a lot more flexible. Typescript is loving amazing though.

IAmKale
Jun 7, 2007

やらないか

Fun Shoe
Is there any reason to avoid defining PropTypes in React? I know recently they were moved out of React and into their own prop-types NPM package, but aside from that I haven't seen a whole lot of talk about them. Did Flow supersede them?

prom candy
Dec 16, 2005

Only I may dance
You should use them if you're not using something else already, like flow or typescript.

Chenghiz
Feb 14, 2007

WHITE WHALE
HOLY GRAIL

Nolgthorn posted:

Just for numbers, I'd do it myself...

Please don’t post links to w3schools.

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense

Chenghiz posted:

Please don’t post links to w3schools.

Is MDN better? The same information always seems to be on both.

Bruegels Fuckbooks
Sep 14, 2004

Now, listen - I know the two of you are very different from each other in a lot of ways, but you have to understand that as far as Grandpa's concerned, you're both pieces of shit! Yeah. I can prove it mathematically.

Nolgthorn posted:

Is MDN better? The same information always seems to be on both.

MDN is much better maintained, and the browser compatibility section is extremely useful if you do this for a living. w3schools is generally 5 years out of date and has no information about browser compatibility.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

I think I just read somewhere that Microsoft and Google have both committed to maintaining MDN along with Mozilla.

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense
I don't wanna sound like one of those people who thinks Microsoft Google and Mozilla have all run their course but I'm that guy. Who's running the other one, the w3 schools?

zombienietzsche
Dec 9, 2003
Someone called Refsnes Data that doesn’t do anything else of note. W3schools is also notorious for providing outdated or just plain wrong information.

Edit: and I want to point out that the maintainers of the major browsers are going to be the best at publishing what their browser does and does not support, and also has the most impactful voice on what browsers will support in the future. From that perspective it will be very hard to argue that any of those three has “run their course.”

zombienietzsche fucked around with this message at 22:48 on Oct 21, 2017

geeves
Sep 16, 2004

Bruegels Fuckbooks posted:

MDN is much better maintained, and the browser compatibility section is extremely useful if you do this for a living. w3schools is generally 5 years out of date and has no information about browser compatibility.

MDN is really good. If they had a 'try it yourself' section like w3schools, it'd be incredible.

I would add https://plainjs.com/ for people who have been overly-reliant on jQuery.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Nolgthorn posted:

I don't wanna sound like one of those people who thinks Microsoft Google and Mozilla have all run their course but I'm that guy. Who's running the other one, the w3 schools?

So, who would you like to document what their browsers do?

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense
I would like to see documentation by the World Wide Web Consortium, which is where language features and standards come from. And I want browser makers like those companies you mentioned to implement those standards properly.

Mozilla fell into the same "social posturing" politically fuelled pit Google fell into and I don't think Microsoft is doing much better. I care about technology not what organisations the CEO is currently donating to. Why does that go with the technology I am using?

If these companies are the ones designing browser features we're not in a good place.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

I don't really know of any standards where I'd rather have the standards committee documentation to rather than the standard implementors. The implementation pretty much always differs somewhat from the standard.

Besides Google, etc basically are the W3C.

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense

Thermopyle posted:

Besides Google, etc basically are the W3C.

there's no escaping them is there.

Rubellavator
Aug 16, 2007

Also, W3C is involved in it.

https://blog.mozilla.org/blog/2017/10/18/mozilla-brings-microsoft-google-w3c-samsung-together-create-cross-browser-documentation-mdn/

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!

geeves posted:

I would add https://plainjs.com/ for people who have been overly-reliant on jQuery.

http://youmightnotneedjquery.com/ to help people transition.

the talent deficit
Dec 20, 2003

self-deprecation is a very british trait, and problems can arise when the british attempt to do so with a foreign culture





are there any good examples of typescript libraries with documentation generated from type information and/or jsdoc? the jsdoc generated documentation i've dug up seems really terrible and it's not clear to me how to add things like module level documentation

Shy
Mar 20, 2010

Nolgthorn posted:

I would like to see documentation by the World Wide Web Consortium, which is where language features and standards come from. And I want browser makers like those companies you mentioned to implement those standards properly.

Mozilla fell into the same "social posturing" politically fuelled pit Google fell into and I don't think Microsoft is doing much better. I care about technology not what organisations the CEO is currently donating to. Why does that go with the technology I am using?

If these companies are the ones designing browser features we're not in a good place.

W3C has regularly had significant differences with implementations and for the rest you can take your own advice and focus on technology rather than what other goals big companies pursue.

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!

Nolgthorn posted:

I would like to see documentation by the World Wide Web Consortium, which is where language features and standards come from. And I want browser makers like those companies you mentioned to implement those standards properly.

The thing is, often times browser vendors make their browser work with a feature before that feature is 100% finalized by the W3C. This is because the W3C often takes way too long to finalize a standard and how we got the WHATWG.

geeves
Sep 16, 2004

Nolgthorn posted:

I would like to see documentation by the World Wide Web Consortium

Yes, W3C champion of DRM. It's been 4 years and I'm still amazed they thought that was a good idea.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

geeves posted:

Yes, W3C champion of DRM. It's been 4 years and I'm still amazed they thought that was a good idea.

Yeah, this whole thing is a fiasco.

geeves
Sep 16, 2004

Thermopyle posted:

Yeah, this whole thing is a fiasco.

On a second thought, it's not all the W3C and I'm not surprised Google and Apple are on board though (and probably influencing W3C). They're selling movies through Youtube (or Itunes) and gotta appear to protecting that money.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

geeves posted:

On a second thought, it's not all the W3C and I'm not surprised Google and Apple are on board though (and probably influencing W3C). They're selling movies through Youtube (or Itunes) and gotta appear to protecting that money.

Bingo.

teen phone cutie
Jun 18, 2012

last year i rewrote something awful from scratch because i hate myself
What do you guys recommend when using polyfills with create-react-app? I just ejected an app today to insert only the polyfills I needed, but I know there’s ways to do it without ejecting

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Grump posted:

What do you guys recommend when using polyfills with create-react-app? I just ejected an app today to insert only the polyfills I needed, but I know there’s ways to do it without ejecting

No need to eject:

https://stackoverflow.com/questions/43756211/best-way-to-polyfill-es6-features-in-react-app-that-uses-create-react-app

teen phone cutie
Jun 18, 2012

last year i rewrote something awful from scratch because i hate myself

ah. I'll keep this in mind in the future.

Besides for losing out on the configuration abstraction, what exactly are the cons of ejecting a create-react-app?

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Grump posted:

ah. I'll keep this in mind in the future.

Besides for losing out on the configuration abstraction, what exactly are the cons of ejecting a create-react-app?

You lose brain-dead easy updating of things.

Knifegrab
Jul 30, 2014

Gadzooks! I'm terrified of this little child who is going to stab me with a knife. I must wrest the knife away from his control and therefore gain the upperhand.
I'm not familiar with what ejecting means in this context, can someone expand?

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Knifegrab posted:

I'm not familiar with what ejecting means in this context, can someone expand?

https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#npm-run-eject

Knifegrab
Jul 30, 2014

Gadzooks! I'm terrified of this little child who is going to stab me with a knife. I must wrest the knife away from his control and therefore gain the upperhand.

Thank you!

prom candy
Dec 16, 2005

Only I may dance
I wish CRA would allow raw file imports. Getting pretty sick of converting all my svgs to react components just to inline them.

Odette
Mar 19, 2011

prom candy posted:

I wish CRA would allow raw file imports. Getting pretty sick of converting all my svgs to react components just to inline them.

Well, you could always create a plugin that does just that. :v:

Adbot
ADBOT LOVES YOU

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.

Odette posted:

Well, you could always create a plugin that does just that. :v:

There's a webpack loader that imports them as strings, which you can load with dangerouslySetInnerHtml (which we've been using), but it would be neat to run it through something that transpiled it to React friendly code, which wouldn't bee too hard to do.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply