Giter VIP home page Giter VIP logo

react_quickstart's Introduction

React Quickstart Module

This modules is intended to make integrating React into your Drupal 8 project as quick and easy as possible.
Built on the following incredible technologies:

  • React
  • Webpack
  • Babel

Getting started

  1. Clone this repo into your modules or modules/custom folder
  2. cd react_quickstart/static
  3. To install the React and the other JavaScript dependencies, run npm install
  4. To start the build engine: npm run dev, which will watch the source files and re-build after any change
  5. For production builds, run npm run build

Included Examples

This repo includes an React-ified block - a Clock app which will render the time on an analog clock using React.

Directory Structure

--src/
  |
  --Plugin/
    |
    --Block/
      |
      --ClockFaceBlock.php //Example block for the clock face demo

--static/ //folder containing all of our static assets
  |
  --common/  //Folder for custom utilities or components shared by multiple "apps".
  |
  --dist/ //This is where the compiled bundles will be placed
  |
  --src/ //Source code for our "apps"
  |  |
  |  --clock/
  |    |
  |    --clock.jsx //Clock face example React component
  |    
  --.babelrc //Config information for babel
  |
  --.gitignore
  |
  --package.json
  |
  --webpack.config.js //Config information for the webpack build system
  
--LICENSE

--react_quickstart.info.yml //module definition

--react_quickstart.libraries.yml //defines the react library as well as our React "apps"
   
      

Shameless self-promotion

If you're interested in learning more about webpack, babel, or react - check our blog series on the right way to set up React projects here: https://www.bowst.com/article/bowst-about-react-part-1

react_quickstart's People

Contributors

dtraft avatar

Watchers

James Cloos 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.