Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brand new React Boilerplate with Create React App 馃帀 #2906

Open
Can-Sahin opened this issue Apr 25, 2020 · 23 comments
Open

Brand new React Boilerplate with Create React App 馃帀 #2906

Can-Sahin opened this issue Apr 25, 2020 · 23 comments

Comments

@Can-Sahin
Copy link
Member

Can-Sahin commented Apr 25, 2020

Brand new React Boilerplate with Create React App 馃帀

Repo: React Boilerplate CRA

Freshly built React Boilerplate on top of the create-react-app. CRA is leading the industry and is a powerfull bootstrapping tool. I(also a maintanier here) decided to join their strengths and make a new boilerplate that is much easier to maintain and develop, also providing a much stronger/robust base with CRA. Bootstrapping responsibility is now on the CRA and the react-boilerplate takes care of the always promised better architecture and tools

Since its built from zero again there are many nice changes and features.

Major Changes & Updates

  • New UI 馃帀Take a look
    • Example application comes with much better, tutorial-based web app
    • Users can check the features out by trying them one-by-one
  • Redux Toolkit 馃帀
    • Redux Toolkit was on hold for quite a time here on dev.
  • Documention on Gitbook 馃帀 Take a look
    • Documentation moved to gitbook with many updates and touches
  • i18next
    • Replaced react-intl with i18next
    • Much simpler and react friendly.
  • Typescript
    • Boost your DX, scalability, productivity. Typescript is the future for complex projects.
    • Completely built with ts. Therefore, 100% intellisense support EVERYWHERE馃帀
    • type-safety and compile-time-safety will be your best friend :)
    • Still want to write js? Hmm, you still can. I'm sure you will quit very soon once you get the taste:)

Minor Changes

  • Started from scratch. Therefore all the dead, not necessary codes and sections are removed
  • Switched to styled-components/macro instead of a babel-plugin
  • Switched to github workflows.

and many more touches...

Version 0.1.0 is published and ready to start new projects. All the opinions and contributions are very welcome. Just getting started, so there might be some bugs and typos and you know.... Any input from you is valuable at this point


@julienben @gretzky @mxstbr
What are your opinions? With the CRA taking care of the half of the work it becomes much easier to maintain for us, meaning less time consuming and better productivity. Currently this repo is very inactive. Everyone is busy lately(lot of issue and pull requests are waiting) and everything is falling behind (packages and configurations). Plus JS is no more maintanable, TS superceeds it undoubtly for me. Everything is just much better with it.

Description Steps to reproduce Versions (to avoid issue-close-app)

@Can-Sahin Can-Sahin pinned this issue Apr 25, 2020
@cuongdevjs
Copy link

cuongdevjs commented Apr 27, 2020

So excited. Awesome. but have you upgraded react-redux in this version? :)

@Can-Sahin
Copy link
Member Author

yes its the latest version.

@cuongdevjs
Copy link

Are you considering a plan to add immerjs as default dependency? @Can-Sahin

@Can-Sahin
Copy link
Member Author

Why? Lets continue at the repo issues by the way not here:) If something is missing you can open an issue there

@gretzky
Copy link
Member

gretzky commented Apr 30, 2020

This is great @Can-Sahin - a long time coming. Excellent work. I think a lot of people will really enjoy this.

The only hangup I have here is that this template is in TypeScript, which 'regular' react-boilerplate is not. Don't get me wrong, I prefer TS, but I don't want this to be a blocker for anyone that would find using CRA with rbp helpful, only to find its not a 1 to 1 match if they ever need to cross-reference. Of course don't spend more time than you need/want on conversions! I've been on this project for about 3 years now, and past experience with users tells me there might be a road block or confusion with the mix of TS/JS. Again, I'm not really 'requesting' anything here, I just wanted to mention it so we aren't thrown off by that potential path.

@Can-Sahin
Copy link
Member Author

I see but why would anyone need to compare or cross reference to the original one? Its another version and honestly I think its much better(after 2 years of using and contributing to this boilerplate).

It will of course leave things behind and move on. One thing is leaving JS for me (users can still write in js though on top of this). Actually boilerplate's motto is scalability and TS must be the first building block of it. It was discussed here as well favoring TS. So, imo, TS must be the path eventually. Due to the nature of TS it can never be like JS again. It adds many good things and simplifies everything.

The problem with the original one is now:
1 - Its stale. Lot of issue and pull requests waiting for a long time.

2 - Its really hard to maintain. All the bootstrapping thing I realized CRA was doing is quite amazing. This lacks so many stuff and has so many outdated stuff. JS world is very fast and here we are obviously not keeping up with it. So making CRA responsible for those parts is better for us and for users too. I can now focus only on rest and comfortably rely on CRA. Less effort but better quality.

Considering these, to provide a better boilerplate CRA and TS is a definitive choice for me. That's why I did it. I developed like 3 projects using this boilerplate and seen lot of downsides of custom bootstrapping. I am migrating to CRA slowly. For instance it took me 4 hours to realize some dead code in boilerplate prevents tree-shaking. And it was like that for quite a while and everyone has that problem without being aware of it. Who knows how many other things are causing hidden problems like this simply because its very hard to test and maintain properly.

All in all I think this boilerplate provides solid ideas and tools however fails to keep the quality and be active due to the reason i listed above. It would be much better to evolve to keep up the good work.

What do you think @gretzky also @julienben it would be nicer to hear your opinions as well. My plan is to maintain only the CRA version now. I also a have a dream to merge that in here so that react-boilerplate continues to improve. Otherwise I think and currently see its slowly dying.

@gretzky
Copy link
Member

gretzky commented Apr 30, 2020

Like I said before, I don't disagree with these changes. I will say, however, that we all know the frontend world tends to enjoy rearchitecting things at a fast pace without looking back. There isn't anything wrong with that, since TS and CRA are widely used at this point, but IMO it would be unfair to say "CRA and TypeScript are the way now" and move to that without some kind of write up / plan for how to move in that direction so that users know the motives and plans behind this.

The other thing on my mind is that this is a large undertaking, and not that many people are super active in maintaining this these days, myself included. My fear is that 1 person making 2 extremely large changes to a boilerplate that's widely used will not be sustainable.

tl;dr I don't disagree with these changes / moving in this direction, but I don't want to be a part of the frontend stereotype of "rearchitecting for the sake of rearchitecting and leave everything else behind". I don't find that sustainable or inclusive.

@gretzky
Copy link
Member

gretzky commented Apr 30, 2020

Speaking just on the technical side, here are some tradeoffs I can see potentially arising.

  • Being beholden to changes made in CRA. This may just get annoying after awhile trying to keep up, but we'd have to.
  • Having to filter issues that are CRA-related, or actual rbp-related. Again, just a potential annoyance, but I'm guessing we may get issues that have to do with CRA and not rbp.

A general tradeoff is "how does this effect users who modify this boilerplate to fit their projects needs?" When things work "magically" it's great, but it isn't one-size-fits-all as a lot of people like to think.

Again these are just potential tradeoffs to consider.

@Can-Sahin
Copy link
Member Author

Definitely understanding what you mean by undertaking. Don't want to make big jumps on a long running repo. Thats why I opened another repo instead of changing the typescript version of this repo (which is being used by others for 1+ year now). If its gonna happen it must happen slowly in time and with everyones mutual agreement.

But the problem is like you have said. This is becoming more stale (nobody maintaining actively) and its indeed hard to maintain. My point is to drive to a direction (in this case to CRA) instead of standing still and disappointing people. So many pull requests and issues and probably so many bugs are awaiting.

This boilerplate is not updatable anyway not like a npm package. Everyone cloning is starting from scratch probably. So every new version is mostly for new comers. Rearchitecting can help everyone. Nothing is a breaking change in that sense.

All my idea was lets do something so that maintaining becomes easier for us and we can provide better tools and practices for everyone instead of drowning in bootstrapping problems which CRA does a pretty good job at. Everyone benefits.

@Can-Sahin
Copy link
Member Author

I already have 2 CRA related issue open ahah :)

But its kinda good for me. Gets me in track with CRA.

CRA has eject option. You can edit everything if you want. After that you are all alone and you wont get updates. Thats upto users who want to customize their projects. And for those who are fine with default settings (which covers majority) they get updates and be much more sustainable.

@gretzky
Copy link
Member

gretzky commented Apr 30, 2020

I think we're on the same page here @Can-Sahin, great work again. I always wanted to bootstrap rbp to CRA, thank you for bringing that to life.

@Can-Sahin
Copy link
Member Author

:) Lets see how its gonna turn out. Getting issues slowly :)

You know I just don't want to watch rpb dying slowly due to inactivity and be outdated. Still I find the toolset and practices very valuable and wanna keep it alive. All this effort and comments originates from this wish :) This is simply my solution and suggestion. Just wanted to discuss

@Can-Sahin
Copy link
Member Author

Can-Sahin commented Jun 2, 2020

@gretzky I tried to contact julien (2 emails) and no response. So I am guessing he isn't in the game anymore?? There hasn't been any sort of activity last 6 months and no release over a year. I am quitting looking at pull requests and issues since I have no relation or time left to this version. If you think that carrying the CRA version over could be a solution then I can work on it. If not, then for me it's flatline :(

@jwinn
Copy link
Collaborator

jwinn commented Jun 2, 2020

@Can-Sahin whilst I'm not able (anymore) to dedicate much, if any, time to helping on this project, I feel moving the project to leveraging CRA is inline with @mxstbr intent for where this project would inevitably go. I have (nor am I sure if I'll get time) not yet looked at the work you've done, but wanted to express my understanding of relayed wishes for the project's trajectory, i.e. to go toward leveraging/integrating with CRA.

@joeyparis
Copy link

Does this mean new projects should be started with React Boilerplate CRA and not this repo?

@gretzky
Copy link
Member

gretzky commented Jun 16, 2020

@jwinn said it best, I agree.

@gretzky
Copy link
Member

gretzky commented Jun 16, 2020

@joeyparis I'd say it would be up to your discretion for now, take a look around both repos and see which would fit your projects needs.

@rockiger
Copy link

@joeyparis I am totally new to React Boilerplate, too. From my first impression I would go with React Boilerplate CRA. With the exception you can't stand any TypeScript. But you can use JavaScript if you want.

@Can-Sahin
Copy link
Member Author

So @gretzky @jwinn should I work towards that and release v5? Ofc with lot of descriptions etc explaining and giving a quick walkthrough on changes etc.

Since this is JS and CRA version is TS, I am also thinking of making the javascript version of the app/components and containers folders to set an example for the people still wanting use JS.

@jwinn
Copy link
Collaborator

jwinn commented Jun 19, 2020

@Can-Sahin I'm of the opinion that--especially with JS version mentioned--seems the correct path for v5 of the bp. I'll try to get some time to review your PR/submission.

@Can-Sahin
Copy link
Member Author

Well the two repos are extremely different now and I cannot merge anything. Plus I already implemented some of the pull requests waiting here in my repo. So my idea is to merge some of the pull requests first(just to honor the people, because their suggested changes are already in my repo) then truncate the entire repo and finally transfer my repos commits entirely. I have to transfer the repo here(its built from scratch) and I guess this is the way that I can keep the contributions as well.

You can just review the other repo whenever you have time to:)

@Can-Sahin
Copy link
Member Author

Can-Sahin commented Jul 3, 2020

Edit: Not merging anything. Gonna stay as two separate repos.

Anybody reading this discussion check both of the repos and decide on your own on which one fits you the most.

@binaryfire
Copy link

Hi guys

Just a suggestion: you should add a prominent message to the top of your readme explaining this repo is deprecated and pointing to the CRA repo. At first glance the project seems abandoned. It's only by chance that I checked the issues.

This is also the only repo that appears when Googling "React app boilerplate" (the CRA one doesn't)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants