Hacker News new | past | comments | ask | show | jobs | submit login

I’ll admit to using the words framework and library interchangeably when referring to React in my day to day, but what distinguishes React from frameworks to me is the fact it doesn’t tie itself to a particular rendering context, i.e. it is flexible and unopininated and relies on wrappers and rendering libraries to actually function.



Maybe not standard definition but I view a library as something that can be swapped out of a project with low-medium effort.

If I build an app on React, there's not much chance I'm ever going to swap it out for anything else, thus it's a framework.

If I use Twilio's JS library for sending SMS and then decide to swap to a different vendor (or a different library for the Twilio API) that's fairly easy with the right design.


> If I build an app on React, there's not much chance I'm ever going to swap it out for anything else, thus it's a framework.

Preact exists though? And literally emulates React's API. It even has a guide for aliasing the Preact module as React with your bundler so your app wouldn't need any code changes. Can a framework do that?




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: