Questions tagged [preact]

Used for questions related to Preact, a fast 3kb alternative to React.

Preact is a fast 3kb alternative with the same API

Related links

524 questions
0
votes
1 answer

'preact build' does not finish

I am new to preact and react. Whenever I build my preact pwa using 'preact build', as per the output the build never reaches 100%. It only goes upto 91% but looking at the built code it seems the build is 100% completed (I have deployed the build…
Akshey Jawa
  • 447
  • 1
  • 9
  • 19
0
votes
1 answer

webpack configuration in preact-cli

I created an app using preact-cli. I want to change some configuration of webpack. I created preact.config.js and passed it to 'preact build' through '--config'. I added this piece of code in preact.config.js to switch off 'hints'. export default…
Akshey Jawa
  • 447
  • 1
  • 9
  • 19
0
votes
2 answers

Preact You may need an appropriate loader to handle this file type

Just need some help please I'm losing my mind with this struggle. I've searched a lot of posts of this kind of same issue and it didn't work that's what I'm here asking for help. I'm currently running simple React on a webpack-dev-server and when I…
0
votes
0 answers

React child components undefined in HOC after rerender

I want to crate higher order component, add some logic in 'componentDidMount' and then force it to update via "this.setState({});". But after setState({}) fired, next props (in render method) became an emty object {}, and this.props.children also…
Vololodymyr
  • 1,996
  • 5
  • 26
  • 45
0
votes
1 answer

preact-router not working properly whenever click hyper link

I'm currently developing Preact for my small project. One of my page is Master Detail page. Left side is detail page and right side is list page. Problem is whenever I click link on right side list page, detail page not rendered as getting stuck but…
PPShein
  • 13,309
  • 42
  • 142
  • 227
0
votes
2 answers

undefined tag into preact component

I'm very new to preact and i'm trying to implement a PWA in preact. In particular, this example should display a list of people id. This is index.html page:
bobc82
  • 497
  • 7
  • 17
0
votes
1 answer

preact compat causing component to mount infinitely

I have working reactjs app with redux and react router. I want to switch to preact. When I updated webpack config to alias react and react dom. Component started mounting infinitely. It mount then unmount .. goes on doing so. Webpack config.…
Uchit Kumar
  • 667
  • 10
  • 26
0
votes
1 answer

Create pluggable component in Preact

I've started working with preact to create a pwa with a smaller footprint. All's going well till now and the app is almost done as a modular component. The trouble in paradise occurred when I tried to plug this component inside another react web…
amit
  • 10,133
  • 22
  • 72
  • 121
0
votes
2 answers

Preact and FabricJS

I am starting to work on an application using preact, and I would like to know if it is possible to use FabricJS in preact. Can someone help me understand how I can do this?
joek1975
  • 3,573
  • 5
  • 40
  • 44
0
votes
0 answers

How to use preact-compat with server side rendering in rollup + buble setup?

I have a preact app which is using rollup + buble. I need to use another component text-mask which uses React. I am trying to create alias within my rollup build file. For the client side, it works flawlessly however when building on the server…
Ranjith Nair
  • 475
  • 1
  • 6
  • 17
0
votes
1 answer

what is the need to create .babelrc in preact application

I am starting with Preact application. the documentation says Instead of declaring the @jsx pragma in your code, it's best to configure it globally in a .babelrc: For Babel 5 and prior: { "jsxPragma": "h" } For Babel 6: { "plugins": [ …
OpenStack
  • 5,048
  • 9
  • 34
  • 69
0
votes
1 answer

how to create preact-cli custom production build

I'm now studying preact-cli and so far, it's working though. Problem is when we're gonna build for production, there is zero-configuration for it and found no works for api caching. Is there anyone who has had experience about it, please let me…
PPShein
  • 13,309
  • 42
  • 142
  • 227
0
votes
1 answer

React-Router-v4 Not Working on Preact via Babel Register

I am trying to setup an server rending react using react-router-4. While it works just fine on the front-end side (Webpack). It appears that preact-compat is not working when used in the server side. I am using babel-register so transpile the…
Mr A
  • 1,345
  • 4
  • 22
  • 51
0
votes
1 answer

Code Splitting React components

Im relatively new to React (i'm using preact.js, to be precise) and i am trying to code split out react components using webpack 2. Im exporting my component as stated in the documentation and i am then importing it on load. …
Millard
  • 1,157
  • 1
  • 9
  • 19
0
votes
3 answers

preact async router doesn't find chunk

I'm quite new to react.js (using preact) and run into a problem with async routing (preact-async-router). My main.js: import { h, render } from 'preact'; import {Router, Route} from 'preact-router'; import AsyncRoute from…
Kian
  • 695
  • 2
  • 11
  • 23
1 2 3
34
35