I agree with your example. A framework is the basis for a project (think create-react-app), a library is bolted on top (e.g. jQuery).
It gets interesting with petite-vue, which provides a bolt-on solution for framework-like features. Not sure how to categorize that.
<script type="module"> import { createApp } from 'https://unpkg.com/petite-vue?module' function Counter(props) { return { count: props.initialCount, inc() { this.count++ }, mounted() { console.log(`I'm mounted!`) } } } createApp({ Counter }).mount() </script>
This starts it effectively making it the "main program"
createApp({ Counter }).mount()
This is user code that is called by it
function Counter(props) { return { count: props.initialCount, inc() { this.count++ }, mounted() { console.log(`I'm mounted!`) } } }
therefore it (petite-vue) is a framework.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I agree with your example. A framework is the basis for a project (think create-react-app), a library is bolted on top (e.g. jQuery).
It gets interesting with petite-vue, which provides a bolt-on solution for framework-like features. Not sure how to categorize that.
This starts it effectively making it the "main program"
This is user code that is called by it
therefore it (petite-vue) is a framework.