Skip to content

this node_modules implementation works because node_modules must be in browser compatible javascript to be used.

Notifications You must be signed in to change notification settings

md-web-client/minimal-react-with-node_modules

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minimal React

This is a template for building React.js web apps without browserify, babel, and JSX.

Installation

git clone https://github.com/MichaelDimmitt/minimal-react-with-node_modules.git
npm install
open index.html

Why is this project so minimal?

This project is a learning repo for understanding how react can be implemented without webpack/browserfi, and babel transpiling your JSX.

Many use react for its readibility. This project does not have the readibility because it does not take advantage of JSX being transpiled into browser compatable javascript.

Coding is hard without babel:
Correct, this project is about understanding that babel is transpiling your code into: yikes!

Why "with-node_modules"

HTML link's to the browser compatable javascript in the node_modules folder.
Previously it would have linked to a cdn. check out minimal-react
However, that cdn can go down.
Additionally it gives the latest stable.
Using node-modules allows an easier way to quickly try out different releases.
It also enables a specific version to be defined and never changed.

Note: I have added the package-lock.json to the .gitignore.
Your project should probably keep this file.
However, it would be best implemented in a package-lock.json included branch.
So as not to clutter the git history.

View next Project/Progression

For a strategy regarding returning only what a user with specific roles will ever view.
Make sure to check out express_serving_minimal_react, specifically: server.js
Where only one html file will be sent to a user. but it will be the one for their security role.

About

this node_modules implementation works because node_modules must be in browser compatible javascript to be used.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published