Skip to content

Instantly share code, notes, and snippets.

@g-patel
g-patel / index.js
Last active February 14, 2017 20:43
import Vue from 'vue';
Vue.config.devtools = true;
const componentsContext = require.context('./components', true, /\.vue$/);
const ComponentsById = {};
const ComponentsByName = {};
const ComponentsMap = {};
const cMap = {};
const ComponentNames = [];
require('./index.styl');
<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<div id="root">nothing rendered yet</div>
<script src='https://unpkg.com/[email protected]/umd/react.development.js'></script>
<script src='https://unpkg.com/[email protected]/umd/react-dom.development.js'></script>
<script src="https://unpkg.com/@babel/[email protected]/babel.js"></script>
@g-patel
g-patel / gist:2e1301de8caaa3d088ff71bd29cbe6a7
Created May 20, 2019 04:39
Sample.tsx ans SampleTests.tsx (How "rendering" deals with React Elements, and only react elements)
//Sample.tsx
import * as React from 'react';
export function Tiny(props: any) {
return (
<div id="tiny" ></div>
);
}