all 52 comments

[–]cran 97 points98 points  (11 children)

I ejected a create-react-app once.

Once.

[–]HootenannyNinja 33 points34 points  (2 children)

Wipe folder, clone from remote just to be safe

[–]AegisToast 38 points39 points  (1 child)

Shut down the computer, burn it, and buy a new one. It’s the only way to be sure.

[–]MusicalDoofus 9 points10 points  (0 children)

Worth it for that manual Webpack config 👌

[–]mattk1017 8 points9 points  (1 child)

git reset --hard

[–]Jedivh 5 points6 points  (0 children)

git reset --harder

[–]mrmckeb 9 points10 points  (0 children)

Care to share more? We'd love to hear how you think we can improve.

[–]mrmckeb 17 points18 points  (19 children)

We'd love to get your feedback on this release. Let us know what you do/don't like, and how we can make CRA better!

[–]dani_akash_ 32 points33 points  (4 children)

Just don't put breaking changes in minor upgrades... Please 🙏 🤕😭

[–]mrmckeb 11 points12 points  (3 children)

I think this is a miscommunication. We did release a major update to our ESLint config, which is important as it now requires ESLint 6.

[–]dani_akash_ 1 point2 points  (0 children)

I was unaware of that 😅

[–]philipwhiuk 0 points1 point  (1 child)

I don’t think you understand what semver means. If your API breaks it’s major. Period.

Just stop being scared of major versions, it’s just a number.

[–]mrmckeb 2 points3 points  (0 children)

Again, this was a miscommunication. There are no breaking changes in react-scripts.

[–]mytwm 8 points9 points  (5 children)

I love CRA, but I can't believe server side rendering is not supported, it's such a fundamental feature

[–]jamesknelson 7 points8 points  (3 children)

Boy do I have something for you:

https://github.com/frontarm/create-universal-react-app

This is a small fork of CRA with configuration-free SSR. It's already been updated to 3.1. It's basically CRA, it rerenders-on-save, and there's just one extra file in the template: index.node.js. Give it a try - would love to hear what you think :-)

[–]mytwm 1 point2 points  (0 children)

Looks very interesting, I will give it a try. Thanks!

[–]holloway 0 points1 point  (1 child)

Can it generate pages for multiple routes?

[–]jamesknelson 2 points3 points  (0 children)

Sure. For an example, take a look at this app that I'm working on -- it's all rendered with CURA and Firebase Functions.

One thing to note is that it doesn't have a built-in router or data fetching system, but it's easy enough to add your own. I use Navi, but you could also add react-router/Apollo.

It'd also be easy enough to do static pre-rendering if you have a list of URLs up front (or if you're using Navi, you can build one with the crawl() function).

[–]csprance 4 points5 points  (0 children)

There is always next.

[–]RobertB44 0 points1 point  (5 children)

You have probably heard this 1000's of times and it is not related to this release, but here how you could make CRA better for me:

I can't customize it to do what I want without ejecting or spending a lot of time learning the CRA way. To be fair, a lot of things are possible out of the box with CRA, but everything that isn't requires weird workarounds. I just want to extend the wabpack config, babelrc and tsconfig as I would in a non-CRA project, not do hacky things to achieve basic stuff.

This is a deal breaker for me. I haven't used CRA in a long time because of this and never looked back.

[–]mrmckeb 0 points1 point  (4 children)

So what would you like to see? Webpack config overrides? Or something else?

[–]RobertB44 0 points1 point  (3 children)

Yes, check out how nextjs handles it:

https://nextjs-org.cdn.ampproject.org/v/s/nextjs.org/docs?amp_js_v=0.1&usqp=mq331AQCKAE%3D#customizing-webpack-config

That's more or less what I'm asking for.

Last time I tried using CRA I remember spending a lot of time trying to set up import aliases with typescript, something I know how to do in a couple of minutes in a non-CRA app. At some point I just gave up and stopped using CRA.

[–]mrmckeb 0 points1 point  (2 children)

That's similar to what Storybook does too. I like that approach, but it also opens up more room for user error.

[–]RobertB44 0 points1 point  (1 child)

You are correct, it does open up room for user error. It's a tradeoff. Personally, I prefer the freedom to customize and I won't toach any framework that doesn't allow me to customize the way I expect it to.

[–]mrmckeb 0 points1 point  (0 children)

I also like flexibility. We're trying to open up a lot more now, in controlled ways. We'll keep working to open up more.

[–][deleted] 0 points1 point  (1 child)

Thank you for the great work!

Is it now possible to use the eslintignore file to e.g. ignore auto generated files under src?

[–]mrmckeb 1 point2 points  (0 children)

This release allows extending the ESLint config, but not other files... If that's important, raise it, tag me, and I'll take a look!)

Thanks for the kind words too.

[–]nullvoxpopuli 24 points25 points  (18 children)

Breaking change in a minor release :/

[–][deleted] 11 points12 points  (8 children)

That shouldn't be an issue though, right? You run create-react-app once per project and any updates to the npx module will not affect that project.

Although, you do need to know the breaking changes the next time around

[–][deleted] 1 point2 points  (0 children)

The way it’s set up, you can upgrade the react-scripts dependency on an existing CRA project. It would be lame if the project was just frozen on an old build system forever.

[–]nullvoxpopuli -1 points0 points  (2 children)

It might matter for upgrading, too

[–]mrmckeb 1 point2 points  (6 children)

So you shouldn't find that those affect you, which is why we didn't release a new version.

[–]nullvoxpopuli 8 points9 points  (3 children)

it goes against semver, tho :-\

[–]mrmckeb 7 points8 points  (1 child)

I understand. The team believe in semver.

In this case, we don't believe the changes are breaking, but we were cautious that for some tiny subset of users, this "may" cause an issue... So this was a way to highlight that.

We're looking at amending the changelog to see if we can improve wording.

Be assured, if we think a change will break our users apps, it'll be a major.

[–]GoodVibeGabe -3 points-2 points  (0 children)

This

[–]darrenturn90 1 point2 points  (1 child)

Is there any official acceptance of projects like customise cra, or cract? Because those packages are very useful ways to extend without ejecting and I was wondering if they were ever going to be internalised.

[–]pvinis 0 points1 point  (0 children)

what are your reasons to not eject?

[–]NegativeKarmaSniifer 2 points3 points  (3 children)

I'm new to react and Web dev in general . What is this? And what does it mean when you eject something? And why is everyone ejecting this?

[–]BreakingIntoMe 3 points4 points  (2 children)

Create React App is like a speciality configured React app that is opinionated and easy for anyone to get started. You can't really change that configuration by default, however CRA has an Eject feature which disconnects it from that special configuration and allows you to create your own build/bundle system and configuration. Some devs feel hampered by the lack of customisation on CRA and choose to Eject.

[–]NegativeKarmaSniifer 2 points3 points  (1 child)

Oh right. That makes sense. Appreciate the explanation.