Skip to content
/ Weact Public

A wee little frontend framework imitating React.

Notifications You must be signed in to change notification settings

matthaws/Weact

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weact

Wee little recreation of React

A dive into React's magic through recreating its core features.

Features

  • JSX parsing via Babel, Rollup, and Weact.createElement. Use JSX syntax to your heart's content!

  • Class and pure functional components, including all standard lifecycle methods, props, and state.

  • Processes and updates event handlers, attributes, and inline styles to the DOM

  • Uses an incremental rendering, time-slicing reconciliation workflow inspired by the new React Fiber architecture. Reconciliation with the virtual DOM doesn't block the thread, woo hoo! This post on my blog gives more details on how I implemented this.

  • Now includes basic routing with Route, Link, and Redirect classes!

  • Now includes "Wedux" with createStore and combineReducers. Basic Weact integration is provided in the form of a configureConnect function that uses closure (rather than a Provider and the React context API, which is not yet part of Weact) to create a connect function that will create a connected Higher Order Component with access to Wedux state and dispatch.

Acknowledgements

React is a very clever piece of tech, especially its new Fiber plumbing, and I'm indebted to some great articles and guides for helping me dig in and get to grips on the concepts and how to recreate them. I highly recommend checking them out, especially if you are at all interested in embarking on a similar project:

About

A wee little frontend framework imitating React.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published