Giter Club home page Giter Club logo

examples's Introduction

ReactQL

ReactQL - example projects

ReactQL is a starter kit for building React + GraphQL front-ends.

It comes in Javascript and Typescript flavours, and has a CLI tool for quickly spawning new projects on Windows, Mac or Linux.

It features a universal code base, that runs both in the browser and server-side, and offers a built-in web server with server-side rendering.

This flexibility makes the kit ideal for a variety of use cases -- from building rich, single page web and mobile apps, to running your own GraphQL server from the same code base.

This repo features a growing list of runnable examples to demonstrate how ReactQL can be used.

Projects

Current example projects:

Swaps out the Graphcool service for your own GraphQL server, running alongside the built-in Koa web server. Demonstrates a monolithic application, where the GraphQL endpoint 'lives' next to your front-end code.

ReactQL makes an awesome general purpose front-end, even if you're not using GraphQL. This example rips out GraphQL, and demos a simple to-do component that uses Redux stores to manage state globally.

How to run

Each project appears in its own folder.

Clone this repo, cd into your preferred example directory, then run:

npm i

... to install the required packages for that particular project.

Then run npm start to spawn a hot-reloading Webpack dev server on http://localhost:8080 and a full server-side rendering capable web server on http://localhost:8081 -- both environments will rebuild automatically on code changes.

To run in 'production' mode

Run:

npm run build-run

And navigate to http://localhost:4000

To build a bundle you can host statically

If you want to build any example and host it statically - say, via S3, Github pages, Netlify or anywhere else - you can build a static version by running:

npm run build

Then just copy over your dist/public folder to any host.

To run it locally after building, run npm run static (or combine the above two commands with npm run build-static-run)

Want to start your own project?

See the CLI tool for easily deploying this starter kit on Mac, Windows or Linux.

PRs welcome!

If you have your own examples to share, check out the contribution guidelines.

Need help?

Complete documentation @ https://reactql.org

Or open an issue on Github.

examples's People

Contributors

leebenson avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.