jhsware / inferno-bootstrap Goto Github PK
View Code? Open in Web Editor NEWBootstrap 4 as Inferno.js components, no need for jQuery
Home Page: https://jhsware.github.io/inferno-bootstrap-docs
Bootstrap 4 as Inferno.js components, no need for jQuery
Home Page: https://jhsware.github.io/inferno-bootstrap-docs
Thanks for creating this library I was about to give up on inferno as I didn't want to go back to v3 bootstrap.
For me the main thing is modal support using your docs I got that working with the following import:
import { Button, Modal, ModalHeader, ModalBody, ModalFooter } from 'inferno-bootstrap';
However I would like to improve that and use either /lib or the /dist/Modal/Modal' approaches. I'm getting the following errors when I do that.
With:
import { Button, Modal, ModalHeader, ModalBody, ModalFooter } from 'inferno-bootstrap/lib';
I'm getting:
./node_modules/inferno-bootstrap/lib/Popover.js
Module parse failed: Unexpected token (141:6)
You may need an appropriate loader to handle this file type.
|
| return (
| <PopperContent
| className={popperClasses}
| target={this.props.target}
and with:
import { Button } from 'inferno-bootstrap/dist/Button';
import { Modal } from 'inferno-bootstrap/dist/Modal/Modal';
import { ModalHeader } from 'inferno-bootstrap/dist/Modal/ModalHeader';
import { ModalBody } from 'inferno-bootstrap/dist/Modal/ModalBody';
import { ModalFooter } from 'inferno-bootstrap/dist/Modal/ModalFooter';
I'm getting run time errors:
TypeError: Cannot read property 'prototype' of undefined
createComponentVNode
node_modules/inferno/dist/index.dev.esm.js:248
245 | }
246 | }
247 | if ((flags & 2 /* ComponentUnknown */) > 0) {
> 248 | flags = isDefined(type.prototype) && isFunction(type.prototype.render) ? 4 /* ComponentClass */ : 8 /* ComponentFunction */;
249 | }
250 | // set default props
251 | var defaultProps = type.defaultProps;
I'm new to inferno so I hope I'm not wasting your time but any help would be appreciated.
$ npm start
[email protected] start C:\dev\projects\scrap\inferno-seed
inferno-scripts start
The setup
option is deprecated and will be removed in v3. Please update your config to use before
Starting the development server...
Failed to compile.
./node_modules/inferno-bootstrap/lib/Button.js
Module parse failed: C:\dev\projects\inferno-seed\node_modules\inferno-bootstrap\lib\Button.js Unexpected token (40:6)
You may need an appropriate loader to handle this file type.
| tag: Tag,
| innerRef,
| ...attributes
| } = this.props;
|
I have a working Inferno app: https://codesandbox.io/s/l2o9034mq
When I just try to add a Button to the Post.js component I get:
Unhandled Rejection (ReferenceError)
React is not defined
Button.render
/node_modules/inferno-bootstrap/lib/Button.js:56:4
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.