infernojs / inferno-boilerplate Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
webpack-cli shouldn't be bundled, I think it should be a devDependency instead.
I tried to get the boilerplate running but it seems that it does not build correctly. I get a blank white page and the following error in the browser.
Uncaught ReferenceError: Inferno is not defined
Steps
cd inferno-boilerplate
npm install
npm start
Please make a boilerplate version (branch), that shows, how to start an Inferno project with TypeScrtipt base. I see version 1.0.0 is already in 32 beta. In mean time I can check out https://github.com/infernojs/inferno-typescript-example (It's grown a little old :)) ?
Add a branch for SSR using inferno-server to provide a sample configuration
This page contains obsolete information relying on abandoned packages (fluxbox is dead). Replacing this page with a link to the new sample branch of this repository would be far better.
Instead of writing documentation on the website, embed documentation in the sample boilerplate in the form of comments.
I recommend Fastify over Express for the server-side
I've get "Uncaught SyntaxError: Unexpected token <" error when I want to redirect for path="/user/sina" .
import Inferno from 'inferno';
import { Router, Route, IndexRoute } from 'inferno-router';
import createBrowserHistory from 'history/createBrowserHistory';
const browserHistory = createBrowserHistory();
function App({ children }) {
return (
<div>
{children}
</div>
)
}
function NoMatch({ children, params }) {
return (
<div>no match</div>
)
}
function Home({ children }) {
return (
<div>home</div>
)
}
// `children` in this case will be the `User` component
function Users({ children, params }) {
return (
<div>
<h2>fs</h2>
{children}
</div>
)
}
function User({ params }) {
return <h1>{JSON.stringify(params)}</h1>
}
const routes = (
<Router history={browserHistory}>
<Route component={App}>
<IndexRoute component={Home} />
<Route path="/users" component={Users}>
<Route path="/user/:username" component={User} />
</Route>
<Route path="*" component={NoMatch} />
</Route>
</Router>
);
// Render HTML on the browser
Inferno.render(routes, document.getElementById('app'));
I am trying to use inferno-mobx binding with inferno-boilerplate but I cannot enable decorators. I tried adding plugin transform-decorators-legacy
to .babelrc
but it did not work.
Hi! I see the yarnlock, but I did an npm install
, not sure if that's totally fine, because I get a router related error in the browser console (after npm start && open localhost:8080
):
Uncaught TypeError: Inferno: Error "inferno-router" requires a history prop passed
at createrRouter (bundle.js:9659)
at new Router (bundle.js:9684)
at Object.createClassComponentInstance (bundle.js:1282)
at mountComponent (bundle.js:4250)
at Object.mount (bundle.js:4130)
at render (bundle.js:3488)
at Object._typeof (bundle.js:7132)
at __webpack_require__ (bundle.js:660)
at fn (bundle.js:84)
at Object.<anonymous> (bundle.js:15634)
Hi! The project has eslint, but no eslintrc (webstorm complained a bit about it) - probably semistandard would be fine, but not really sure if it's intentional. Thanks!
This is outdated, even more than create-inferno-app.
Please maintain one minimal boilerplate up to date to facilitate adoption.
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.