![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
In this repo, we are experimenting with technology that might serve as our next generation front end technology stack: hops spices our brew (i.e. web front end) with ECMAScript and Flow, CSS Next and CSS Modules, JSX/React and Flux/Redux. To get an impression take a look at our example app.
Hops is not yet another boilerplate. Hops is a self-contained but highly extensible development and build environment that is packaged as a single module. Batteries included.
Besides recent versions of Node.js and npm, hops has no global dependencies. If you need those, we recommend using nvm or similar.
mkdir foo && cd foo
npm init -y
npm install -SE hops
A postinstall script will attempt to bootstrap and configure the project hops is being installed to: after installation, you can instantly start developing.
For developing with hops, you can use any decent editor with up-to-date language support. Those without a favorite we recommend Atom with the linter, linter-eslint and linter-stylelint plugins.
npm start (--production)
If called without the --production
flag, a development server with hot module replacement is started. In production mode, a static build is initialized.
render()
is hops main function: it creates a Redux store, sets up React Router and handles rendering both client- and server-side. Using it is mandatory and its output must be the default export of your main module. And it's a little magic.
import { render } from 'hops';
import { reducers } from './reducers';
import { routes } from './routes';
export default render({ routes, reducers });
In addition to routes
and reducers
, an html mountPoint
selector and a createStore
factory function may be passed as options.
createFetchAction()
basically allows you to map a json api url to a specific slice of your application's state. It uses the Fetch API under the hood.
import { createFetchAction } from 'hops';
const fetch = createFetchAction('foo', 'https://example.com/foo');
dispatch(fetch());
Both createFetchAction()
and the action creator function it returns accept options
arguments that are merged and passed straight on to fetch()
.
createAction()
is just a small helper function to work with reducers generated with createReducer()
. It is being used internally by createFetchAction()
.
import { createAction } from 'hops';
const update = createAction('foo');
dispatch(update({'bar': {'$set': 'baz'}}));
createReducer()
generates a Redux reducer function using the provided key and React's immutability helpers.
import { createReducer } from 'hops';
export const reducers = { foo: createReducer('foo')};
Hops supports server-side data fetching for route components: it calls their static fetchData
methods and expects them to return promises. Of course, asynchronous actions are supported by using thunks.
The beautiful hops icon used in the logo was created by The Crew at Fusionary and provided via The Noun Project. It is licensed under a Creative Commons license.
FAQs
Hops main Package to build and run Hops applications
We found that hops demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.