Git Product home page Git Product logo

create-react-web-component's Introduction

Create React Web Component Tweet

NPM Version Github License Build Status Code Coverage

This project has been deprecated, and will no longer be maintained!

The project is now carried on at Direflow




Set up a React App wrapped in a Web Component

This setup is is based on react-scripts from create-react-app
A thorough description of the principles used in this setup, can be read in this article

Getting Started

Install

Get started by running the command

npx create-react-web-component

Or install the package globally

  • yarn

    yarn global add create-react-web-component
  • npm

    npm i -g create-react-web-component

This will bootstrap a new project for you.
Now use the following commands:

cd <project-folder>
yarn install
yarn start

Your project will start running on localhost:3000 and your browser opens a new window

Contributing

Issues

In the case of a bug report, bugfix or a suggestions, please feel very free to open an issue.

Pull request

Pull requests are always welcome, and I'll do my best to do reviews as fast as I can.

License

This project is licensed under the MIT License

Get Help

Read more about using Web Components with React on the official React Docs

create-react-web-component's People

Contributors

oterral avatar simonhoiberg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

create-react-web-component's Issues

componentTitle not updated when using useState hook

Hi,
I just started tinkering with create-react-web-component. I used create-react-web-component to create a new web component "web-component" without adjusting anything in the created component.

I then copied over the bundle.js to an app I created with create-react-app.

In the "host" app I added a <script src="%PUBLIC_URL%/bundle.js"></script> to the public/index.html and I adjusted the the host App component to be like shown in this gist: https://gist.github.com/huberv/9ac6264239448e58e0f80690aaf40507

The initial rendering of the web component works fine and shows the correct title. However, when clicking the "toggle title"-button, the web component's title is not updated. I'm a bit stumped why.

IE 11 support

Hi,

Does it works in IE 11?

I tried to add some polyfills, but it's not working at all in IE11 (it's working offcourse in chrome).

Any ideas?

Thank you
Marko

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.