Skip to content

Releases: siddharthkp/bae

Rebrand to bae!

Choose a tag to compare

@siddharthkp siddharthkp released this 20 Sep 10:41

reaqt has been renamed to bae for easier verbal conversations about it 😅

Reduced time to first byte by streaming

Choose a tag to compare

@siddharthkp siddharthkp released this 04 Apr 12:43
  • Uses rapscallion under the hood
  • Render some content on the screen fast - don't keep your users waiting

Benchmarks:

ttfb (ms) total (ms)
without streaming 151 151
with streaming 22 110

fetch data asynchronously on the server

Choose a tag to compare

@siddharthkp siddharthkp released this 17 Mar 09:55



react made easy

 
 

asyncComponentWillMount

React has a lifecycle method that get's called on the server componentWillMount that can be used to set data for server rendering. But, it does not support asynchronous data fetching before rendering the component.

reaqt introduces a new lifecycle method to pages that runs only on the server.

import React from 'react'

export default class extends React.Component {
  constructor (props) {
    super(props)
    this.state = {username: 'siddharthkp'}
  }
  asyncComponentWillMount () {
    /* 
      Return a promise.
      It will get resolved on the server and passed as props to the component.
    */
    return axios.get(`https://api.github.com/users/${this.state.username}`)
  }
  render () {
    return <div>{this.props.bio}</div>
  }
}

v1.0.0

Choose a tag to compare

@siddharthkp siddharthkp released this 13 Mar 17:19



react made easy

 
 

  • Quick start ⚡️
  • Minimal tooling 🔧
  • Server rendered + out of the box optimisations 🚀
  • Dev mode with hot module replacement 📦