1.1.1 • Published 2 years ago

var-jsx v1.1.1

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Var - Jsx

It's jsx translator that can easily be used

const {jsx} = require(`jsx`);

it's done!\ now you can use jsx.translate to translate

jsx.translate(`const a = <div>hi!</div>`);
const a = Var.make(`a`,[],Var.text(`hi!`));

you can also customize the returning code

jsx.setting = {
    "domMaker" : "make",
    "textMaker" : "text",
    "stateMaker" : "state",
    "changeMaker" : "change"
}

if you want to use variables, try this

const a = <div><-variable-></div>;
const a = Var.make(`div`,[],Var.change(variable));

domMaker

dom maker function is the function that should function as making virtual dom\

const domMakerName = (name,states, ...child) => {
    //name : string
    //states : Array<{name, date}>
    //...child : virtualDom
};

textMaker

textMaker function should function as making text virtual dom

const textMakerName = (data) => {
    //data : string
};

stateMaker

stateMaker function should function as making state

const stateMakerName = (name,data) => {
    //name : string
    //data : string
}

changeMaker

changeMaker function should function\ as change variable (whose type isn't virtualDom) to virtualDom

const changeMakerName = (data) => {
    //data : any
}
1.1.1

2 years ago

1.1.0

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago