Code Monkey home page Code Monkey logo

veact's Introduction

Veact

I'm trying to create some tool similar to React for the web,

How to run it

You need to execute the following two comands in two terminals

  1. Run the transpilation to js_browser
v -b js_browser veact.v
  1. Run some server to serve the root of the project (I have a copy of verve)
v run verve.v

Status

Seems that currently the transpilation of V to js_browser doesn't work fine.

Is doing some ugly stuff, and missing some objects with the types I created

Example of ugly stuff

function main__Component_T_main__Object_main__Object_get_element_T_main__Object_main__Object(c) {
c = new $ref(c)
	try {
		let _tmp34;
		if (_tmp34 = c.val.old, _tmp34.state == 0) {
			let [ast.IfGuardVar{
    name: 'cached'
    is_mut: false
    pos: token.Pos{
        len: 6
        line_nr: 43
        pos: 814
        col: 4
        last_line: 43
    }
}][0].name = _tmp34.data;
			return cached;
		} else {
			let err = _tmp34.err;
			/** @type {main__Element} */
			const e = main__Component_T_main__Object_main__Object_render_T_main__Object_main__Object(c.valueOf(),);
			/** @type {main__Element} */
			c.val.old = e;
			return e;
		}
	} catch (e) { 
		if (e instanceof ReturnException) { return e.val; } 
		throw e;
	}
}

veact's People

Contributors

dracks avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.