1.3.0 • Published 6 years ago
stnd.js v1.3.0
Standard.js ·
A very efficient, flexible Javascript framework for user facing interfaces.
Installation
Application Structure:
Require the module:
inside main.js(entry js file):
Register the components:
Storing the component's data:
Rendering the component on a target:
Data-flow between components:
Reset the component's data and automatic re-render:
Data-binding:
if home component has a data {name: "home component"},
then inside the html of home component use expression: {{name}}
Basic example:
You will need to bundle everything and send to server for which you can use webpack bundler and a "html-loader"
webpack.config.js
index.html
<div id="root"></div>
main.js
home.js
home.html
<h1>Home</h1>
<button id="renderView">Render view component</button>
{{title}}
view.js
view.html
<h1>View</h1>
<button id="renderHome">Render Home Component on root</button>
{{title}}
to fetch from a mock or live api, standardJS provides apis:
the apis and examples on https://yashkumar6640.github.io/stdFetch/
Run your index.html with live server to quickly test
License
standardJS is MIT Licensed