Can I use an opensource boilerplate for react projects?

So I understand that it is recommended to use codepen for the react projects because it requires no setup and stuff but I also find it somewhat limiting when it comes to real world react development. So I decided to do the react projects on github and use gh-pages for the demo but we all know webpack config is big challenge, so I am procrastinating on that one so I can focus on just understanding react/redux/reselect/saga,and unit tests. I understand the basic webpack setup but not the more advanced stuff like code splitting and setting up servers,etc.

Is it ok to use a boilerplate, or if I go this route, I’m I required to build from scratch?

2 Likes

I’ve used Yeoman for a few projects. Frankly, I think you’ll spend more time figuring out how the tool’s authors set everything up than it would take to do it from scratch, but as far as I know there are no rules against it.

1 Like

I think the main requirements are that your code is publicly viewable and, for the React challenges, that you use React. I ended up coding most of mine outside of Codepen so I could use Webpack and magical hot module replacement, but in the end I just copied my code back into Codepen so that it would still be viewable there.

1 Like

Cool, thanks for the replies. I tried to learn all these things at once react, es6, webpack, postcss, redux, redux… and quickly found my brain literally spinning out of control. I think I finally got redux, redux saga down, then came mobx :cry:. I will dedicate a special time for webpack

Thanks again

It might take a while at first to configure everything if you don’t use a boilerplate. Here is a basic one on my github if you want to check it out: https://github.com/gwenf/react-boilerplate

I like starting with a basic boilerplate as it saves a lot of time and headache. Yeoman and some other boilerplates are pretty complicated to start with so I would just use something simple and slowly add features. If you want to see something with Redux, I can upload one that includes that too.

3 Likes

I should also say for these FCC React projects you definitely don’t have to use anything above and beyond React and ReactDOM, e.g. Redux, although you can.

For the first three, you definitely don’t need redux, but I think it’s helpful for the last two.

For the webpack and other set-up if you are doing it offline, I would find a basic boilerplate and use it for all the project, updating it each time.

Yeah I know Redux is not required but I needed to practice it. I used Redux for the Tic Tac Toe challenge and Redux + Redux saga for the Simon game to manage timing (worked out really well).

I finally got the project demo to work on github pages, woohoo! Now let’s see if I can write tests.