Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
frint-compat
Advanced tools
Backwards compatibility package for Frint
Everything that you see here has been deprecated and should not be intentionally used.
With npm:
$ npm install --save frint-compat
Via unpkg CDN:
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.4/lodash.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/rxjs/5.0.1/Rx.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.8/react.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.8/react-dom.min.js"></script>
<script src="https://unpkg.com/frint@latest/dist/frint.min.js"></script>
<script src="https://unpkg.com/frint-model@latest/dist/frint-model.min.js"></script>
<script src="https://unpkg.com/frint-react@latest/dist/frint-react.min.js"></script>
<script src="https://unpkg.com/frint-store@latest/dist/frint-store.min.js"></script>
<script src="https://unpkg.com/frint-compat@latest/dist/frint-compat.min.js"></script>
<script>
// available as `window.Frint` (now backwards compatible)
</script>
Load it after you have loaded all other packages:
require('frint-compat');
Doing so would mutate other packages to keep them backwards compatible.
createComponent(options)
Creates a new Component, using React internally.
options
(Object
):
render
(Function
[required]): Function returning JSX.beforeMount
(Function
): Called before mounting the Component.afterMount
(Function
): Called after mounting the Component.beforeUnmount
(Function
): Called right before unmounting the Component.Component
: React Component.
h(type, props, children)
The hyperscript wrapping React's React.createElement
. This function is expected to be in the scope wherever JSX is used.
PropTypes
For typechecking Component's props.
createService(options)
options
(Object
): Methods for your class.
options.initialize
(Function
): Treated as class constructor.Function
: ES6-compatible class.
createFactory(options)
options
(Object
): Methods for your class.
options.initialize
(Function
): Treated as class constructor.Function
: ES6-compatible class.
createApp(options)
options
(Object
):
options.component
(Function
): The root Component of your App.options.services
(Object
): Key/value pairs of Service classes.options.factories
(Object
): Key/value pairs of Factory classes.options.models
(Object
): Key/value pairs of Model classes.options.modelAttributes
(Object
): Key/value pairs of Model attributes.options.store
(Object
): The Store instance.options.reducer
(Function
): Root reducer for your Store.options.initialState
(Object
): Initial state for your Store.beforeMount
(Function
): Called before mounting the App.afterMount
(Function
): Called after mounting the App.beforeUnmount
(Function
): Called right before unmounting the App.App
: App class.
new App()
App instance methods:
app.getRootApp()
Extends the native getRootApp()
, and looks for window.app
first, and then returns it if exists.
App
: The root app's instance.
app.getState$()
Observable
: State of your App's store.
app.dispatch(action)
action
(Object
|Function
): Action payload to dispatch to your App's store.void
app.render()
Function
: The root component.
app.getStore()
Store
: The app's store instance.
app.getService(name)
name
(String
): The name of the Service.Object
: The service instance.
app.getFactory(name)
name
(String
): The name of the Factory.Object
: The factory instance.
app.getModel(name)
name
(String
): The name of the Model.Object
: The model instance.
app.setRegion(name)
name
(String
): The name of the region.void
.
app.setRegions(names)
names
(Array
): Array of region names.void
.
app.getWidgets(regionName = null)
regionName
(String
[optional]): Optionally filter widgets by their region.Array
: of widget instances.
app.readStateFrom(names)
names
(Array
): Array of other App names that you wish to read state from.void
.
mapToProps(options)(Component)
Maps data coming from various sources into Component's props.
options
(Object
):
options.state
(Function
): Accepts state
(Object
) as argument, and returns object to map as props.options.dispatch
(Object
): Dispatchable action creators, keyed by prop namesapp
(Function
): Accepts app
(App
) as argument, and returns object to map as props.shared
(Function
): Accepts shared
(Object
) state as argument, and returns object to map as props.services
(Object
): Object keyed by prop names, and service names as values.factories
(Object
): Object keyed by prop names, and factory names as values.models
(Object
): Object keyed by prop names, and model names as values.observe
(Function
): Accepts app
(App
) as an argument, and returns an Observable
emitting object to be mapped as props.Function
: That can be alled with the target Component.
new Store()
store.subscribe(fn)
fn
(Function
): Listener function, that accepts the latest state as argument.Function
: Call the returned function to unsubscribe from the listener.
v1.0.1 (2017-03-21)
frint-compat
frint-model
, frint
frint-model
FAQs
Backwards compatibility package for Frint
The npm package frint-compat receives a total of 3 weekly downloads. As such, frint-compat popularity was classified as not popular.
We found that frint-compat demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 9 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.