zpao / building-react-from-scratch Goto Github PK
View Code? Open in Web Editor NEWCode for my React Rally talk.
Code for my React Rally talk.
in MultiChild.js file
case UPDATE_TYPES.MOVE: DOM.insertChildAfter( parentNode, parentNode.childNodes[fromIndex], update.afterNode, ); break;
move method depends on 'fromIndex' (which is previous componet's _mountindex),which should be changed once some component insert before
feels like that move method should rely on real DOM node, but not _mountindex
ERROR in ../dilithium/index.js
Module build failed: ReferenceError: Unknown plugin "transform-class-properties" specified in "/Users/qinhao/git_clone/learn-react-source-code/dilithium/package.json" at 0, attempted to resolve relative to "/Users/qinhao/git_clone/learn-react-source-code/dilithium"
at /Users/qinhao/git_clone/learn-react-source-code/demo/node_modules/babel-core/lib/transformation/file/options/option-manager.js:180:17
at Array.map (<anonymous>)
at Function.normalisePlugins (/Users/qinhao/git_clone/learn-react-source-code/demo/node_modules/babel-core/lib/transformation/file/options/option-manager.js:158:20)
at OptionManager.mergeOptions (/Users/qinhao/git_clone/learn-react-source-code/demo/node_modules/babel-core/lib/transformation/file/options/option-manager.js:234:36)
at OptionManager.init (/Users/qinhao/git_clone/learn-react-source-code/demo/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
at File.initOptions (/Users/qinhao/git_clone/learn-react-source-code/demo/node_modules/babel-core/lib/transformation/file/index.js:212:65)
at new File (/Users/qinhao/git_clone/learn-react-source-code/demo/node_modules/babel-core/lib/transformation/file/index.js:135:24)
at Pipeline.transform (/Users/qinhao/git_clone/learn-react-source-code/demo/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
at transpile (/Users/qinhao/git_clone/learn-react-source-code/demo/node_modules/babel-loader/lib/index.js:46:20)
at Object.module.exports (/Users/qinhao/git_clone/learn-react-source-code/demo/node_modules/babel-loader/lib/index.js:163:20)
@ ./app.js 1:18-41
Still got the same after trying npm install babel-plugin-transform-class-properties
npm version:
6.1.0
node version:
v10.6.0
hey! trying to run this and getting this error:
ERROR in ../dilithium/dilithium.js
Module build failed: ReferenceError: Unknown plugin "transform-react-jsx" specified in "base" at 0, attempted to resolve relative to "/Users/swyx/OpenSource/building-react-from-scratch/dilithium"
at /Users/swyx/OpenSource/building-react-from-scratch/demo/node_modules/babel-core/lib/transformation/file/options/option-manager.js:180:17
at Array.map (<anonymous>)
at Function.normalisePlugins (/Users/swyx/OpenSource/building-react-from-scratch/demo/node_modules/babel-core/lib/transformation/file/options/option-manager.js:158:20)
at OptionManager.mergeOptions (/Users/swyx/OpenSource/building-react-from-scratch/demo/node_modules/babel-core/lib/transformation/file/options/option-manager.js:234:36)
at OptionManager.init (/Users/swyx/OpenSource/building-react-from-scratch/demo/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
at File.initOptions (/Users/swyx/OpenSource/building-react-from-scratch/demo/node_modules/babel-core/lib/transformation/file/index.js:212:65)
at new File (/Users/swyx/OpenSource/building-react-from-scratch/demo/node_modules/babel-core/lib/transformation/file/index.js:135:24)
at Pipeline.transform (/Users/swyx/OpenSource/building-react-from-scratch/demo/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
at transpile (/Users/swyx/OpenSource/building-react-from-scratch/demo/node_modules/babel-loader/lib/index.js:46:20)
at Object.module.exports (/Users/swyx/OpenSource/building-react-from-scratch/demo/node_modules/babel-loader/lib/index.js:163:20)
@ ./app.js 3:18-41
is this because the jsx transform was renamed or moved somehow?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.