GithubHelp home page GithubHelp logo

dpastoor / react-ts-component-starter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fpetterlate/react-ts-component-starter

0.0 1.0 0.0 20 KB

What you need to create your own React component using typescript.

TypeScript 19.86% CSS 10.00% JavaScript 70.13%

react-ts-component-starter's Introduction

React Typescript Component Starter

Starter project for creating your own React component with TypeScript. This component is just a demo of what you get when you publish it.

Edit

  • Edit src/index.tsx and src/style.css

Build

  • npm i to install all dependencies.
  • npm run build to build your component
  • npm link to create a symbolic link from the global folder to your component

Run Tests

  • npm run test to run tests
  • npm run test:watch to see test status while your develop

Develop

  • Create a new React app using for example create-react-app. This app will be used for testing your component.
  • Import your react component
  • npm link <your-component> to link node_modules/<your-component> in your application to the global folder. So when importing your component it will call on the built version in the component project.
  • npm start in your component folder. You will see that every time you change something it will automatically rebuild.
  • Run your application. If using create-react-app, run it with npm start.
  • Do some changes in the component and see that the application gets updated.

Publish

  • Edit package.json by adding the correct information like name and author.
  • Create a NPM account
  • npm login with your account information
  • npm publish to publish your component so other can enjoy its existence.

Links

React

TypeScript

Webpack

Inspired by Broda Noels blog.

react-ts-component-starter's People

Contributors

fpetterlate avatar

Watchers

 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.