Live data from Hacker News

Preact : a smaller, faster React alternative

blog.logrocket.com

11–20 of 49 posts

Re: Preact : a smaller, faster React alternative

#11
post #5

anyone can chime in on whether preact can be covered under the same patents that apply to react ?

By what mechanism could you imagine your use of some random javascript library would be affected by being in a patent dispute with Facebook?

Patents regard underlying functionality so if Preact infringes on the patent through using the same or sufficiently similar mechnism's to react functionality, it's a toss up but due to the nature of open source code the user might be liable.

Depends on the ruling of use of open source code that is in a way productized. Also depends on if Preact's implementation is sufficient to infringe on React's patents (if they have any weight to them that is and are upheld)

Its not a random library, its extremely similar to React.

Re: Preact : a smaller, faster React alternative

#12
post #6

People seem to be praising Preact, like its a revolutionary. Its an amazing alternative, especially if you dont agree with the React license but its a complete rip off of React so credit where credits due.

It's not a rip off, it's an implementation of react api.

Re: Preact : a smaller, faster React alternative

#14
post #8
post #3

To all people who write React-alternatives: please modularize as much as possible. For example, JSX-like syntax is not necessary and some developers might not want to use it; therefore, it should be in a separate module that is completely optional. Also, the virtual-DOM part may be useful in itself, therefore it should also be a separate module. React offers some tools to more easily manage state, but please acknowle…

JSX is purely a transpiler thing, so you don't have any code in the final package to handle that aspect

Yes, but why install it if you don't need it? From the perspective of the developer who might have to dig into the sources of his libraries, it is just clutter.

Re: Preact : a smaller, faster React alternative

#15
If you want something which is even smaller and simpler, there's snabbdom[0]. The core vdom implementation is 200 SLOC, everything else is provided via modules, either first-party (toggled classes, event listeners, thunks, hyperscript, …) or third-party (jsx, template strings, …)

[0] https://github.com/snabbdom/snabbdom

Re: Preact : a smaller, faster React alternative

#16
post #14
post #8

Earlier quoted context omitted.

JSX is purely a transpiler thing, so you don't have any code in the final package to handle that aspect

Yes, but why install it if you don't need it? From the perspective of the developer who might have to dig into the sources of his libraries, it is just clutter.

There is zero lines of code that relates to JSX, it all happens in webpack (or equivalent).

Re: Preact : a smaller, faster React alternative

#17

anyone can chime in on whether preact can be covered under the same patents that apply to react ?

Patents don't apply to React. React includes a license addition that prevents you from suing Facebook for software patents, in general .

It isn't structured this way - I think your reading is slightly incorrect. What the FB licensed agreement says that is any patent grants which apply to reactjs/caffe2 will be revoked and FB will countersue for infringement on reactjs/caffe2 patents.

I don't think a general agreement to prevent any kind of lawsuit is completely legal and acceptable in a court of law.

Re: Preact : a smaller, faster React alternative

#18
post #5

Earlier quoted context omitted.

By what mechanism could you imagine your use of some random javascript library would be affected by being in a patent dispute with Facebook?

Patents regard underlying functionality so if Preact infringes on the patent through using the same or sufficiently similar mechnism's to react functionality, it's a toss up but due to the nature of open source code the user might be liable. Depends on the ruling of use of open source code that is in a way productized. Also depends on if Preact's implementation is sufficient to infringe on React's patents (if they ha…

The "Patent" issue with React is not with the patents related to React but with its license, so it would not impact Preact.

Re: Preact : a smaller, faster React alternative

#19
post #3

To all people who write React-alternatives: please modularize as much as possible. For example, JSX-like syntax is not necessary and some developers might not want to use it; therefore, it should be in a separate module that is completely optional. Also, the virtual-DOM part may be useful in itself, therefore it should also be a separate module. React offers some tools to more easily manage state, but please acknowle…

I'm sorry, why would you be using React etc unless you wanted virtual DOM and JSX. Much of why I like React is precisely because it has those features. This really makes no sense to me.

Re: Preact : a smaller, faster React alternative

#20

Is this viable to use as a drop in replacement for React? I am concerned about the license using React, that would be the sole reason to chose something else. I also got few projects in React that we would like to keep.

Same here. I am going to try to replace React with preact for the larger projects (webpack makes it easy) and run the e2e tests.
Post reply on HN