Skip to content

Commit

Permalink
Merge pull request #9 from ReasonVienna/upgrade-to-new-react
Browse files Browse the repository at this point in the history
make it work again
  • Loading branch information
nikgraf authored Jun 21, 2017
2 parents cc8deea + bfe2f98 commit 2355878
Show file tree
Hide file tree
Showing 10 changed files with 4,500 additions and 3,648 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
/lib/*
!/lib/js/*
/build/
/bundledOutputs/
*.log
.DS_Store
30 changes: 2 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,15 @@
Create Reason React App
===

![image](https://cloud.githubusercontent.com/assets/3802023/26065669/945afdb4-398c-11e7-827c-d5ecbb76d0af.png)

Still far from it but I think a good start. I always had an issue with just jumping in and building something with Reason as it felt like there is loads of config involved.

I simplified @chenglou's [example repo](https://github.com/chenglou/reason-react-example) a bit, big thanks to his amazing work!
It lowers the barrier at least for me, hope it's helpful for others too.

**One of the main goals of Reason is to make the tooling simple enough to not need such a tool.**
This is a work in progress towards it.

For now this is more like a quick start to React Reason than a "create-reason-react-app", but the latter is the end goal of this project.
I am still very knew to the language and this is where I want to learn and explore.

### Getting started

1. Clone the repo
2. `yarn` or `npm install`
3. `yarn start` or `npm start`
2. `npm install`
3. `npm start`
4. Open browser and navigate to: http://localhost:8080/

### Intro

The project uses bucklescript build system and webpack under the hood. When you run `yarn start`, `bsb` will run in watch mode and in parallel webpack's dev server is started at http://localhost:8080/. Files build by `bsb` can be found in the `/lib` directory. The amazing thing about `bsb` is that it produces readable javascript files.
After these JS files are produced, `webpack-dev-server` uses them.

### But how can I actually build something in Reason React

I will be adding more guides and examples to this repo. But for now, please check out
@chenglou's repo with a few examples https://github.com/chenglou/reason-react-example.
There's also a lot of information on syntax and Reason itself on the official website: https://facebook.github.io/reason.

### Contribute

I'd like this to be a great "Get started..." place for Reason. Please submit feature requests, issues and pull requests. Feel free to contribute!

### Ideas for future TODOs

* Decode Json using https://github.com/BuckleTypes/bs-json
Expand Down
9 changes: 3 additions & 6 deletions bsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@
comma. If this screws with your editor highlighting, please tell us by filing
an issue! */
{
"name": "create-reason-react-app",
"reason": {
"react-jsx": true
},
"name": "reasonvienna-website",
"reason" : { "react-jsx" : 2},
"bs-dependencies": [
"reason-react",
"bs-director",
"bs-fetch",
"bs-moment"
"bs-fetch"
],
"sources": [
{
Expand Down
Loading

0 comments on commit 2355878

Please sign in to comment.