question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Generate even less code?

See original GitHub issue

From @remy’s amazing First Impressions of React, this paragraph made me sad:

I had a couple of false starts with trying create-react-app, react-boilerplate and another that I forget.

The reason for the false starts is that they contained way too much code and structure and expected understanding. I believe they’ll be super useful once there’s some understanding and ability to navigate the logic behind React apps, but for starting out, I needed to be closer to the metal, I needed to see the direct output of my coding efforts.

Is there anything we could do to better match your use case? These are the files we generate by default. We opted for a bare minimum, just enough to render a single component.

Here’s what we generate:

.gitignore          # good defaults
package.json        # needed for npm
README.md           # tips and usage guide
index.html          # your page
src/index.js        # entry point to show where to put side effects on launch
src/index.css       # put global CSS here
src/App.js          # an example component
src/App.css         # an example component stylesheet
src/App.test.js     # an example component test
src/logo.svg        # an image so you know how to import media assets in code

Should we cut something?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:23 (6 by maintainers)

github_iconTop GitHub Comments

8reactions
hqdocommented, Sep 13, 2016

I’m a react beginner and imo create-react-app has the perfect amount of files. Every file has been useful to me to demonstrate how to do something. I think it strikes the perfect balance between too much and too little.

On Wednesday, 14 September 2016, Dan Abramov notifications@github.com wrote:

From @remy https://github.com/remy’s amazing First Impressions of React https://remysharp.com/2016/09/13/first-impressions-of-react, this paragraph made me sad:

I had a couple of false starts with trying create-react-app, react-boilerplate and another that I forget.

The reason for the false starts is that they contained way too much code and structure and expected understanding. I believe they’ll be super useful once there’s some understanding and ability to navigate the logic behind React apps, but for starting out, I needed to be closer to the metal, I needed to see the direct output of my coding efforts.

Is there anything we could do to better match your use case? These are the files we generate by default https://github.com/facebookincubator/create-react-app/blob/master/template. We opted for a bare minimum, just enough to render a single component.

Here’s what we generate:

.gitignore # good defaults package.json # needed for npm README.md # tips and usage guide index.html # your page src/index.js # entry point to show where to put side effects on launch src/index.css # put global CSS here src/App.js # an example component src/App.css # an example component stylesheet src/App.test.js # an example component test src/logo.svg # an image so you know how to import media assets in code

Should we cut something?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/facebookincubator/create-react-app/issues/642, or mute the thread https://github.com/notifications/unsubscribe-auth/ABEbWgY_hmZRqjR0W-0wJImAJIhBT0riks5qpyP8gaJpZM4J8NwU .

Best Regards,

Huy Do XBITS

P: (02) 8215 0661 E: huy@xbits.com.au

4reactions
remycommented, Sep 14, 2016

@hummlas no, I think you’re on point with your comments, and I was waiting for the discussion to settle a bit before coming back in.

I think it’s important to keep in mind who CRA is for. My comments (in my blog) might be useful, it might not be. My sense is that CRA is for beginners on their journey to learning React.

I was approaching it exactly as @markerikson suggests, very close to a REPL, and wanting to see the effect of change quickly.

Thinking now, the way to tackle this kind of audience might actually just be in the README me, somewhere clearly stating “if you just want to try it out, try this …”. I found gist fascinating, it got me React with JSX in two files and it all just worked (obviously I looked under the hood and I was pulling 2mb of script, but that’s fine for a bit of dabbling).

I hope that helps a little!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Write Less Code, Generate More - YouTube
Want to write less code and let the machine do the work? In this talk, Paul will give an introduction to code generation...
Read more >
Make your code do more, with less
I want to discuss actionable tools to make your code run faster, and generate more results, with less effort, in less time.
Read more >
12 Best Low-code or No-code Platforms to Build Amazing ...
Building applications has become easier than ever with the introduction of low-code or no-code platforms. Now, it's possible to create even more complex....
Read more >
Python program to print all even numbers in a range
Example #1: Print all even numbers from given list using for loop Define start and end limit of range. Iterate from start till...
Read more >
No-code development: A simple guide to the no-code movement
The no-code movement rests upon the fundamental belief that technology should enable and facilitate creation, not be a barrier to entry.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found